My layout consists of 3 columns, each with a width set to 225px. Here's how it's structured:
<div id="main">
<div id="col1">
<p>...</p>
</div>
<div id="col2">
<p>...</p>
</div>
<div id="col3">
<p>...</p>
</div>
</div>
When resizing the browser window, I want col1 to float left, col3 to float right, and col2 to be centered with the margins between col1/2 adjusting accordingly.
However, my CSS isn't working as expected. Here's what I have:
#main {
width:100%;
}
.col1, .col2, .col3 {
width:225px;
}
.col1, .col2 {
float:left;
}
.col3 {
float:right;
}
.col2 {
margin-left:auto;
margin-right:auto;
}