.fl-1,.fl-2,.fl-3,.fl-4 {
border: solid 1px #000;
width: 100px;
height: 100px;
float: left;
background: #def;
position: relative;}
.fl-1 {
margin: 0 -100px -90px 0;
background: #abc;
z-index: 1;}
.fl-2 {
margin: 10px -100px -90px 90px;
background: #def;
z-index: -1;}
.fl-3 {
margin: 20px -100px -90px 90px;
background: #abc;
z-index: 1;}
.fl-4 {
margin: 30px -100px -90px 90px;
background: #def;
z-index: -1;}
.no {
position: absolute;
top: 40%;
left: 40%;}
#independent,#nested {
height: 92px;
width: 400px;
margin-bottom: 40px;
position: relative;
z-index: 0;
border-top: solid 1px #999;
border-left: solid 1px #999;
border-bottom: solid 1px #bbb;}
#nested div {
margin-top: 9px;}
#nested div.fl-1 {
margin-top: 0;}
@media screen {
* html #independent div,
* html #nested div {
display: inline;}
}
Large negative backside-margins are partly "removing" these floats. That's one method for fixing IE-win's buggy behavior.
Layering is done by using positive and negative z-index. Layering is relative to containers holding the floats. Borders shows how each browser is layering relative to these containers.
- Moz/FF are layering independent floats.
- Moz/FF are layering nested floats.
- Opera(pre v9.0) is unable to layer floats.
- Opera 9 is layering independent floats.
- Opera 9 is unable to layer nested floats.
- Safari is layering independent floats.
- Safari is unable to layer nested floats.
- iCab is layering independent floats.
- iCab is unable to layer nested floats.
- IE-win is layering independent floats.
- IE-win is unable to layer nested floats.
- IE-Mac is layering independent floats.
- IE-Mac is unable to layer nested floats.
- IE-Mac ignores margin-top.
[rev: 20.mar.2005] Flaw in html-code corrected. CSS updated. Notes updated.
[rev: 20.oct.2005] Opera 9.0 pre1 tested - notes updated.
[rev: 28.oct.2005] iCab tested - notes updated.