View Full Version : Gap between header and main content

10-09-2009, 05:51 AM
I know it's an old chestnut but I'm having issue with a gap appearing between the Header section and Main Content and as I am wanting to using a background image I just can't fill this with a matching colour.

Page is here http://revamp.pnnmanagement-events.co.uk/trial2.html

Help appreciated, Ian

10-09-2009, 06:33 AM
Try adding...

.oneColFixCtrHdr #mainContent h1 {margin: 0; padding: 0;}

to your styles

10-09-2009, 06:43 AM
Sorted thanks but I still have the space at the bottom also??

10-09-2009, 06:49 AM
It's the same issue apart from it relates to the p tag rather than h1. h1 - 6 and p all have default margins and padding. Zero out what you don't want and you'll be fine.

10-09-2009, 06:53 AM
Great thanks. You've saved hours of head scratching!!

10-09-2009, 06:55 AM
Great thanks. You've saved hours of head scratching!!

No problem and welcome to the forum :)

10-09-2009, 12:13 PM
And remember most HTML elements have some default margins.
If you don't like these you can start of the page by zeroing all these valuies by using a CSS reset file. This is simply a file that tries to reset all the defualt margins to zero.

I've used Eris Meyer's before, and it worked like a charm: