PDA

View Full Version : CSS and h1 manipulation


cedsn
02-16-2003, 05:33 AM
I have a header in my page, using the h1 tag.
I need to use this tag logically, but I also would like to remove the extra space that shows up between the h1 text and the text below it. Why this extra line?

Here is what I am ending up with:
http://www.cedsn.com/aaron/music.html

How can I use CSS to remove this annoyance?

Thanks!

pb&j
02-16-2003, 05:40 AM
Try this...

<h1 style="margin-bottom:0px;"> text here </h1>

jkd
02-16-2003, 05:46 AM
This is the default style applied to <h1>'s by Mozilla:


h1 {
display: block;
font-size: 2em;
font-weight: bold;
margin: .67em 0;
}


As you can see, the margin exists both on the top and bottom. To get rid of it, you can go:

h1 {
margin: 0;
}

In a stylesheet of yours. :)

cedsn
02-16-2003, 05:58 AM
perfect! thanks.