I'm having a little brain drain with spacing that I'd like help with.

The layout on a page I'm working in is experiencing the same problem I can demonstrate better on Russ's example here:

http://css.maxdesign.com.au/selectutorial/steps/step22.htm

Imagine I want a background colour on the header "Heading here" like so (EditCSS in Firefox is great for seeing this live) e.g.:

div#content h2 { background-color: #ccc; margin: 0pt; font-size: 2em; color: rgb(0, 51, 102); padding-top: 1em; font-weight: normal; }

Notice if you do that the background colour touches the top banner edge. So the obvious solution would be to add a little margin in that h2 e.g.:

div#content h2 { background-color: #ccc; margin: 3pt 0 0 0; font-size: 2em; color: rgb(0, 51, 102); padding-top: 1em; font-weight: normal; }

However then a space appears between the banner and the rest of the content and the problem is I'm too dense (plus it's hot and muggy here) to figure out what is the cause of the space.

Thanks in advance,

Nick

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to