I just notice a lot of two column css layout examples are using a float for the first box and a left-margin for the second one.
For a long time now I’ve been using float for all elements and I’m wondering now if the margin technique has some advantages or not ?
I can’t think of any general advantages between the two techniques (at least in modern browsers).
There’s often multiple ways to achieve the same thing with CSS.
In certain scenarios maybe one is better than the other, so it’s best to at least be familiar with the most common techniques.
For instance, see here for a roundup:
http://www.css-resources.com/The-Many-CSS-Page-Layout-Techniques.html
(the code in these demos isn’t exactly using recent or good code, but the point stands)
All the links starting with “2-column” look similar, but use a different technique to achieve two columns.