Can someone tell me the CSS to use to remove the blank line space I always get beneath H1, H2 etc.
Many thanks
Accel
Printable View
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)Quote:
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
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