Creating a basic two column layout with fixed widths is my current project.
<div id='box'>
<div id='ontop'>Ontop</div>
<div id='column1'>Column1</div>
<div id='column2'>Column1</div>
</div>
To style this, I used the following CSS:
#box { width: 20em; }
#column1 {width: 12em;}
#column2 {float: left; width: 8em;}
I am now exploring if it's possible for column1
to expand to "100%" if column2
is empty or not present without using JavaScript, but only CSS.
edit: updated #column1 width. The example had an error and added a div ontop.