Forum Moderators: not2easy
Say I have three <div>'s on a page. One is my Header, one is a Sidebar, and the other is the Content.
I have floated the Sidebar left, and given it a width of 200px. Then I gave the content a margin-left of 200px to create a simple two-column layout.
In Mozilla & other compliant browsers, this seems to work. In IE, it looks like a 3px gap is created between the Sidebar and the Content <div>.
If I the following rules:
html #sidebar { margin-right: -3px; }
html #sidebar { margin-left: 0; }
...It seems to correct IE's problem, however, it causes Mozilla to slide the Content section back under the Sidebar (as it should) because I have overwritten the margin-left: 200px setting of the #Content I had earlier in the style sheet.
Which fix/hack would I use to correct this, and why is happening anyway?
Also, how is a wrapper or container div used in CSS layouts. What's the purpose and how should it be used (maybe a link explaining this).
All help is appreciated.
+---++-----+
¦sb ¦¦ blah¦
+---+¦ blah¦
.....¦blah ¦
.....+-----+