Previous Message
Next Message

This is driving me nuts (dont know what to call it)

Sent by Gunlaug_Sørtun on 29 April 2006 10:10


[EMAIL-REMOVED] wrote:
> I am in the process of developing this site and the wrapper div is 10
>  px lower then it shoudl be. (I made the background blue so that it 
> was more visible)
> 
> The blue should be touching the top of the browser.
> 
> http://ad.aaml.uniquethrudesign.com/

It's a case of 'escaping margins', or 'collapsing margins'[1], as
pointed out by Holly. However, there are more than one visible 'escape'
in most browsers - as IE/win is saved by its 'hasLayout'[2] bugs for one
of them.

The following additions will line up those containers...

#wrapper {
display: table;
}

#rightColumn {
padding-top: 1px;
}

....with the added bonus that wrapper will contain all content - in case
you ever need to declare a real background on it.

Adding...

body {
padding-top: 0;
}

....will make wrapper touch the top in 'pre Opera 9' versions too.

Tested in Firefox 1.5.0.2, Opera 9 beta, Opera 8.5 and IE6. Same result
in all.

regards
	Georg

[1]http://www.w3.org/TR/CSS21/box.html#collapsing-margins
[2]http://www.satzansatz.de/cssd/onhavinglayout.html
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: