Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is there anyway to have an <hr> under text with no vertical space

Tags:

html

css

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?

like image 840
leora Avatar asked Apr 09 '11 13:04

leora


People also ask

How do you make a HR tag full width?

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 /> .

How do I make my HR horizontal?

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.


1 Answers

<styles>
  hr{
    padding: 0px;
    margin: 0px;    
  }
</styles>
like image 122
fl00r Avatar answered Sep 28 '22 04:09

fl00r