开发者

How to align a Division to the right

I am trying to push my sidebar to the right of my page. When I do this my division gets pushed to the bottom of the p开发者_如何学编程age. Why is this?

Here is my page: link text


It is because You use something like

    <div id="Main">
           <div id="content"></div><div id="sidebar"></div>
    </div>

note that Div is a Block element. You have 2 option to correct this issue. use from an inline element like span (instead of content andsidebar ) or convert div to an in-line element with css like

 #sidebar, #content
 {
      display: inline-block;
 }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜