Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove padding beneath heading tag

Tags:

Currently I have a list that has an H3 heading above it (which I can't really remove easily, it's auto generated by a cms) and looks something like this

Headline
|
|
List stuff

and I want to get rid of the pipes. They seem to be "built in" to the <h3> tag, anyone have any idea what CSS property of h3 would get rid of this?

like image 947
Chris Thompson Avatar asked Aug 05 '09 19:08

Chris Thompson


1 Answers

H1, H2, and H3 tags all inherently have a margin and padding added to them by browsers.

You can test this by putting a background on the H1, H2, and H3 tags in css and looking in different browsers.

To remove the "pipe spacing" you should:

h3{
    padding: 0px;
    margin: 0px;
}

Then you can re-add whatever you would like since CSS is a one-way execution path. Consequent CSS values will overwrite base-level CSS.

like image 91
Jonathan Avatar answered Oct 13 '22 03:10

Jonathan