CSS float issue in wordpress template
Having an issue on this site where the content area won't float next to my side bar.
800px content width. If I add up my content and sidebar divs, paddin开发者_运维问答g, etc I'm only coming up with 773px.This is creating a child template from and then editing the the 2011 wordpress template.
http://www.rogerscomcenter.com/
try this
.left-sidebar #content {
margin: 0 26px;
overflow: auto;
width: 484px;
}
.left-sidebar #primary {
float: left;
margin: 0;
}
#primary {
float: left;
margin: 0 -26.4% 0 0;
}
I've cleared all unnecessary parts, added floats and width to both elements ('primary', 'secondary' divs). All seems ok.
http://imageshack.us/photo/my-images/804/rogerscenterforcommerce.jpg/
Change your css from:
.left-sidebar #secondary {
float: left;
margin-left: 28px;
margin-right: 0;
width: 235px;
}
To this:
.left-sidebar #secondary {
float: left;
margin-left: 28px;
margin-right: 0;
position: absolute;
width: 235px;
}
精彩评论