Order of appearance for DIVs with float: left
Posted on 2009-05-07
I have two sets of DIV tags, both are set to float: left. I would expect the first one to appear to the left of the second, but its happening the opposite way. Browser appears to be displaying the first one to the right of the second. How do you control which is displayed first? The documentation I read on the web seems to indicate it would happen the opposite way of what I'm seeing.
The first set is the left-hand navigation, the second is the main content area of the page. When viewing the code, it seems natural that you would see the navigation first (left) followed by the content area (right).
I'm transitioning from table layouts to CSS, so I'm new at this and maybe I'm just thinking in terms of tables, but the order of the code seems like the nav should come first.