CSS Gaps

Associate
Joined
3 Oct 2006
Posts
2,304
Location
London
Hi,

Having a problem getting rid of space between a <h4> and two <p> elements.

blockelements.jpg


What do I need to set to ram the blocks (outlined in red) up against each other?

Thanks

Jon
 
Well, I tend to prefix all my stylesheets with

Code:
* { margin: 0; padding: 0; }

And that clears all the default browser styles on each element (regarding margin and padding). You then work from there and you're set.

Specifically, your problem could be margins, padding or line-height.

Try resetting your styles as above and just build from that. Much easier (a lot lesss hassle when browser testing).
 
Back
Top Bottom