Jump to content

3 column layout help


ChaosKnight

Recommended Posts

I have to redo my entire layout, because clients said it looks too "boxed in" (780px with a border around it).

So I now made it a bit more dynamic with 99% width and margin-left and margin-right set to auto. But now I can't seem to get the layout of the columns right...

 

I got the left bar and the content lined up correctly, but the right bar floats below them and is showing up directly under the left bar

 

It needs to look something like this:

 

    170px          Rest of the 99%            170px

<-----------><-----------------------------><------------>

 

Here is the css code that I tried to achieve this result with:

#body {
width: 99%;
margin-left: auto;
margin-right: auto;
}
#sidebar-left {
float: left;
width: 170px;
}
#content {
margin: 0 170px 0 170px;
}
#sidebar-right {
float: left;
width: 170px;
}

 

Any help will be greatly appreciated...

Thanks

Link to comment
https://forums.phpfreaks.com/topic/206711-3-column-layout-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.