Main Content

With this layout you have the option of locating either the "Main Content" or the "Left Sidebar" first in the html source order.

The #inner div has a left margin set on it. That margin creates the space for the #left div which is shifted into place with a negative margin.

The #main div is floated right and the #left div is floated left and they are both nested in that #inner div.

By floating the #main div to the right it allows us to bring it first in the source order. Then the #left div can be floated left which allows us to shift it directly into the left margin of the #inner div with a negative margin on the #left div.

Float containment is done with a "clearfix" adaption using a pseudo :after block on the #inner div for modern browsers and "haslayout" for IE 6&7.

Expand Column

Left Sidebar

Lorem ipsum dolor sit amet consectetuer ut velit consequat consequat ut. Pede et Suspendisse faucibus Suspendisse dis risus quis fermentum justo egestas. Fusce lacinia non orci Aenean auctor eget interdum et Aenean nulla.

Expand Column