Can someone tell me the CSS to use to remove the blank line space I always get beneath H1, H2 etc.
Many thanks
Accel
| SitePoint Sponsor |


Can someone tell me the CSS to use to remove the blank line space I always get beneath H1, H2 etc.
Many thanks
Accel





hello
*{padding:0;margin:0:} removes the default padding and margins

That's for every element though. (fixed the error before the closing brackets)Originally Posted by all4nerds
If you just want to remove the space for your headings, then use something like:
H1 {padding:0; margin:0;}
H2 {padding:0; margin:0;}
Nadia
Unique CSS Templates by Nadia
Dreamweaver: Tutorials.Templates.CSS Designs
SitePoint Books |My Fireworks Tutorials 1 2
Follow me on Twitter | Community Team Advisor
Or just combine all headings into one rule. ( basically user preference on how to code )
h1,
h2,
h3,
h4 {
margin: 0;
padding: 0;
}
To be very honest, it is always good practice to set all margins and padding to 0 using the
* {
margin: 0;
padding: 0;
}
This will allow you to be able to control everything in pretty much every browser instead of relying on their default values. But like I mentioned previously, it is really a user preference in coding practices IMO.
HTH
Bookmarks