If the middle tag contains your most important content as far as SEO goes, you may want to use a little more creativity to put that content higher in your code and display the middle div first.
This also keeps your div heights fluid.
Code:
/* column container */
.colmask {
position:relative; /* This fixes the IE7 overflow hidden bug */
clear:both;
float:left;
width:100%; /* width of whole page */
overflow:hidden; /* This chops off any overhanging divs */
}
/* common column settings */
.colright,
.colmid,
.colleft {
float:left;
width:100%; /* width of page */
position:relative;
}
.col1,
.col2,
.col3 {
float:left;
position:relative;
padding:0 0 1em 0; /* no left and right padding on columns, we just make them narrower instead
only padding top and bottom is included here, make it whatever value you need */
overflow:hidden;
}
/* 3 Column settings */
.threecol {
background:#eee; /* right column background
colour */
}
.threecol .colmid {
right:25%; /* width of the right column
*/
background:#fff; /* center column background
colour */
}
.threecol .colleft {
right:50%; /* width of the middle
column */
background:#f4f4f4; /* left column background colour */
}
.threecol .col1 {
width:46%; /* width of center column content (column width minus padding on either side) */
left:102%; /* 100% plus left padding of center column */
}
.threecol .col2 {
width:21%; /* Width of left column
content (column width minus padding on either side) */
left:31%; /* width of (right column)
plus (center column left and right padding) plus (left column left padding) */
}
.threecol .col3 {
width:21%; /* Width of right column content (column width minus padding on either side) */
left:85%; /* Please make note of the brackets here:
(100% - left column width)
plus (center column left and right padding) plus (left column left and right
padding) plus (right column left padding) */
}
***********************************************
HTML CODE
***********************************************
<div class="colmask threecol">
<div class="colmid">
<div class="colleft">
<div class="col1">
This is the center column
</div>
<div class="col2">
This is the left column
</div>
<div class="col3">
This is the right column
</div>
</div>
</div>
</div>
Bookmarks