I want to make a div that is a line. Here is my HTML:
<html xmlns="http://www.w3.org/1999/xhtml">     <head>         <link href="clickable.css"  type="text/css" rel="stylesheet" />     </head>     <body >         <div class="line"></div>     </body > </html>  And here my CSS:
.line{     width: 112px;     height: 47px;     border-bottom: 1px solid black;     position: absolute;     } </style>  Nothing is displaying, something is probably wrong in my CSS, but I can't see what.
Its simple to add a horizontal line in your markup, just add: <hr>. Browsers draw a line across the entire width of the container, which can be the entire body or a child element.
Type <br /> (or <br>) where the line break should occur. There is no separate end br tag because it's what's known as an empty (or void) element; it lacks content. Typing br as either <br /> or <br> is perfectly valid in HTML5.
Its working for me
 .line{  width: 112px;  height: 47px;  border-bottom: 1px solid black;  position: absolute;  }  <div class="line"></div>  If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With