Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Problem with margin-top, missing top margin


SuzyUK - 8:50 am on Jul 7, 2008 (gmt 0)


Hi estigma and Welcome to WebmasterWorld!

it's there, just not where you think it is perhaps, it's above the three floated divs

the paragraph "overskrift" is only implicitly 'clearing' the floated content before it, if you add a background color to that paragraph, you will be able to see it behind the floats. that's where it should be, if your floats were not wide enough to fill the page width that paragraph would appear of the right side of them as per floating rules so if you want that paragraph to explicitly clear the floats you'll have to tell it to.

adding clear:both to that paragraph should make it work how you want, keep the background color on to see the difference

p.overskrift
{
font-family: "Trebuchet MS", Verdana;
font-size: 11px;
color: #484848;
margin-bottom:5px;
margin-top:10px;
background: #cfc;
/*clear: both;*/
}

[edited by: SuzyUK at 8:51 am (utc) on July 7, 2008]


Thread source:: http://www.webmasterworld.com/css/3691628.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com