Here's some text just to act as the header without adding additional divs
The side containers are explicitly set in width and outlined in red to show their boundaries. As expected, they float quite happily where they should.
However, you can see a problem already. The container div is taking up the whole page. So what happened to the left and right margin I asked for?
W3schools.com says "The CSS margin properties define the space around elements." I just defined the element, so where's the margin?
I think that is what is causing the issue--it's ignoring that I said I wanted the div to have a margin.
When you are floating something above it, that's no big deal, but it wreaks merry hell with the stuff in the center if you try to set a width for something in it.
I am a table set to 100% of the container element |