What I want is to have mutliple divs after one another, that each is the full width and height of the browser/viewport. When the browser is rezized, the divs should rezise accordingly.
I have succesfully managed to do this in FF and IE (just width: auto and 100% height on each div), but Safari & Chrome still doesn’t get it. The weird thing is, i don’t get what happening in those browsers. While the first div behaves as the way i want, the height gets bigger and bigger for each div, and absolut positioned elements whithin each div ends upp somewhere on the bottom of the page; it’s a mess.
an example of what i am trying to do can be found here: http://konstfuck.se/test/
1) You don’t have a valid Doctype, so your page will be rendered in Quirks mode and, as Henri Sivonen wrote,
2) Add
height: 100%tohtmlandbody. As the spec says:So, if you don’t specify the
heightof the containing block, as is the case in your example, theheightis set toauto.