View Full Version : 3 column css layout, multiple browser problems

08-01-2012, 12:01 PM
I created a 3 column css layout for my website and it works fine on safari but every other web browser it doesn't load properly (the third column, far left, gets kicked down below body div).

this is the css file:

.sidebar1 {
float: left;
width: 180px;
padding: 6px;
border-right-width: thin;
border-right-style: solid;
border-right-color: #999;
background-color: #ffffff;
height: 2000px;

.content {
width: 590px;
float: left;
font-size: 14px;
color: #494949;
padding: 0px 5px 0px 5px;
text-align: left;
.sidebar2 {
float: right;
width: 190x;
border-left-width: thin;
border-left-style: solid;
border-left-color: #999;
background-color: #ffffff;
padding-top: 10px;
padding-right: 0;
padding-bottom: 10px;
padding-left: 0;
height: 2000px;

/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
color: #494949;
font-size: 14px;

/* ~~ The footer styles ~~ */
.footer {
padding: 10px 0;
position: relative;/* this gives IE6 hasLayout to properly clear */
clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
font-family: Verdana, Geneva, sans-serif;
background-color: #e1ebf2;
text-align: center;
border-top-width: thin;
border-top-style: solid;
border-top-color: #666;
color: #333


/* ~~ Miscellaneous float/clear classes ~~ */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
.fltlft { /* this class can be used to float an element left in your page. The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
.clearfloat { /* this class can be placed on a <br /> or empty div as the final element following the last floated div (within the .container) if the .footer is removed or taken out of the .container */
font-size: 1px;
line-height: 0px;

Any advice would be great, thanks:confused:

08-01-2012, 01:25 PM
It's not possible to track the issues in your code without seeing the full CSS+HTML. Anyway, have a look at http://bonrouge.com/3c-hf-fluid-lc.php or http://bonrouge.com/3c-hf-fixed.php to see how to make good 3 column layouts.

08-02-2012, 01:23 AM
Thanks for your help. I noticed at the bottom of the code you provided it has a IE 6 hack...that's obviously whats getting me.