is there anyway to have text and then a
<hr>
where the
<hr>
line is directly under the text and doesn't have any vertical space in between the text and the line?
Your width:100%; on the <hr /> and the padding on the parent were messing things up. The <hr /> naturally stretches across the screen and doesn't need width:100% , so remove it. Then to compensate for the padding, just add the same negative margin to the <hr /> .
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. Originally the HR element was styled using attributes.
<styles>
hr{
padding: 0px;
margin: 0px;
}
</styles>
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