Tricky CSS Layout

Posted by Meep3D on Stack Overflow See other posts from Stack Overflow or by Meep3D
Published on 2010-03-07T20:33:03Z Indexed on 2010/03/09 8:06 UTC
Read the original article Hit count: 675

So I am making a website with quite a problematic layout. There are four corner images TL, TR, BL and BR indicated by black blocks. The dark orange area is the main content (to a width of 960px), with the outside area denoted by the green arrow as the browser window. See diagram:

Diagram

The top image represents the site at its narrowest possible - it shouldn't be allowed to be narrower than this (960px) if it is larger than the defined area there should be no scrollbars. The bottom two images represent different widths of browser.

The bottom left and right black blocks (images) should be at the bottom left and right of the screen at all times, unless the width falls to 960px, in which case the BL and BR images should poke into the main area slightly. If the site is shrunk to, say 200px, the BR image should not still be poking in the right corner.

At this point I don't really care about it working exactly in IE6 (I can get it roughly working) but I can't even figure out how to do it fully without Javascript or extremely experimental CSS. Currently I am using absolutely positioned div's which sort of work, but don't work quite right.

I think I'd be willing to accept a bit of JS if there is no other way but I'd rather not.

Answer very appreciated!

© Stack Overflow or respective owner

Related posts about html

Related posts about css