There are two <div> elements, each with the same class. It is easy to make them into a two-column layout: http://jsfiddle.net/Baumr/nbzHA/3/
So here’s the catch:
How do you add a whitespace between them?
It would be easy to make two separate classes, and float them either way.
Or add a class to one and use margins: http://jsfiddle.net/Baumr/sZehH/1/
But what if they’re in the same class/no class?
Adding a
classon the first div is the best browser compatibility solution, then add your style for this class.There are things I noticed with your fiddle which make it complex to have solution based on your comments to niels. You have a
sectiontag in your fiddle which will render in a browser supporting an html5. But you want to have a compatibility with IE7 and IE6?There are ways for IE7, below is one of those:
This solution use the Adjacent sibling selectors which added a margin-left on the second div. And also, instead of
sectiontag I use a <>div withclass=sectionfor the benefits of browser that don’t supportsection.For
IE6, adding a class on one of the two <>div is the only solution I know.