Lining up columns in CSS
September 18, 2007 9:08 AM
Subscribe
CSS: What's the deal with positioning?
I am slowly setting up a new Wordpress blog,
thanks to the generosity of
pocams, and I can't get the hang of positioning in CSS. I'm using K2 0.9.6. The blog's
here, and as you can see, the sidebars aren't where I'd like them, and the post text inexplicably overshoots the width of the containing div in both IE6 and FF2.
The relevant page structure in the
stylesheet is
body.sidebar-dual
div#page
--div#header
--div.content
----div#primary
------div#current-content
------div#dynamic-content
----div#sidebar-main.secondary
----div#sidebar-alt.secondary
p#footer
The relevant positioning attributes:
#page
width: 950px;
margin: 0 auto;
padding: 0px 0px 10px;
position: relative;
border-bottom: 4px;
clear: both;
#primary
display:inline;
left:170px;
padding:5px;
position:relative;
width:560px;
#sidebar-main (right)
border-left:2px;
float:left;
padding:10px;
width:178px;
#sidebar-alt (left)
border-right:2px;
float:left;
padding:10px 5px;
width:158px;
I removed the 'left' and (negative) margins to get a fresh start.
How do I get a regular 3-column here? Thanks.
posted by daksya to computers & internet (11 comments total)
8 users marked this as a favorite
posted by daksya at 9:11 AM on September 18, 2007