简体   繁体   中英

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. 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/

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.

<div id="content">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM