[英]Wordpress sidebar below content
I have read the articles already, citing that when the sidebar goes under the content it means that usually there's a missing or an extra div
causing the sidebar to wrap out, or that the content or sidebar's width is too wide till it moves out of place. 我已经阅读了文章,并指出当侧边栏位于内容下方时,这意味着通常会缺少或多余的
div
导致侧边栏结束,或者内容或侧边栏的宽度太宽,直到移到适当位置为止。 I've checked mine and I still can't find where I have gone wrong. 我检查了我的地方,但仍然找不到错误的地方。
Full screen fiddle here . 全屏摆弄在这里 。 JS Fiddle: http://jsfiddle.net/nwZB4/
JS小提琴: http : //jsfiddle.net/nwZB4/
try this if 试试这个如果
#sidebar {
float: right;
margin-right: 10px;/*1%*/
padding-right: 0;
width: 290px;/*29%*/
}
#content {
margin: 0 auto;
width: 1000px;/*100%*/
}
#main {
clear: both;
float: left;
padding: 40px 0;
width: 700px;/*70%*/
}
I will answer my own question as I have finally figured it out. 我将回答我自己的问题,因为我终于弄清楚了。
There was an extra line in the header.php which forces the entire content to scale down. header.php中有多余的一行,它会强制缩小整个内容。
<div id="content">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.