开发者

CSS float clearing help

开发者 https://www.devze.com 2023-02-13 05:52 出处:网络
I\'m developing a new website and it seems I\'m missing something that should be obvious.I have a centered wra开发者_运维百科pper div, with a left and right column inside it.The right column is made u

I'm developing a new website and it seems I'm missing something that should be obvious. I have a centered wra开发者_运维百科pper div, with a left and right column inside it. The right column is made up of three "main" divs (#mainTop #main #mainBottom), all floated right. The left column is a smaller, sidebar div (#sidebar) floated left.

If you look at the test site: http://puresas.ebridgesites.com/ you'll see that the left sidebar is clearing the right floated divs, and I can't figure out why.


You can fix it by moving #sideBar to before #mainTop in your HTML.

Live Demo
(Your assets are being loaded thanks to <base href="http://puresas.ebridgesites.com/" />)


Try puting the sidebar between the <div id="mainTop"></div> and <div id="main"></div>. So it'll look like below

<div id="wrap">
  <div id="mainTop"></div>
  <div id="sidebar"></div>
  <div id="main"></div>
  <div id="mainBottom"></div>
</div>
0

精彩评论

暂无评论...
验证码 换一张
取 消