Welcome to WebmasterWorld Guest from 126.96.36.199
Forum Moderators: not2easy
margin: 0px auto;
If a remove the float: left, then the container is centered. But if I add the floating divs, the container floats to the left.
I want to position 2 DIV's next to each other centered IN a container DIV which is also centered. How can this be done?
IE has a bug that will allow a float to increase the vertical dimension of a parent div that uses margin: auto;, so be careful when testing and do read the specs. Testing will help you to fully understand the behavior ramnifications however.
Also, try testing your code and varying the margin values. Experiment with percentages and em. See what behaviors result.
Best of luck!
CSS is not 'theory,' but a very powerful design tool with tremendous potential. And, the potential will only be realized if developers are willing to push beyond perceived limits.