Things You'll Need:
- A web page with the correct HTML and CSS
-
Step 1
HTML PageTo demonstrate, here's a simple HTML page. It's a two column layout in a container div. Notice that the HTML is not for a table. It is a container div that holds two nested divs: a sidebar and a content area.
-
Step 2
StylesheetAssign the following CSS to the page. Notice that the container is assigned the CSS rule display:table and the two inner divs are given the property display:table-cell. The color and border choices are shown to help you recognize the different areas of the layout, but are not necessary for the display.
-
Step 3
In Firefox BrowserThe results display in a grid-like manner with a container table and two cells. This effect was achieved with CSS, not with HTML.
-
Step 4
In the HTML the sidebar came first in the source order. You can reverse that order to place the sidebar on the right by putting the mainContent div first in the HTML source order.












Comments
WolfTech said
on 12/7/2008 Thanks for sharing!