CSS float bug with side pane resizing main content

丶灬走出姿态 提交于 2019-12-13 00:55:24

问题


We're having a problem with a side pane that is floated to the right. This pane somehow resizes the first div in the main content, so the div is stretched to the same height as the pane, see illustration below.

The main div has the following css

margin: 10px 280px 0 10px;
padding-right: 50px;

The side pane has the following css

float: right;
width: 270px;
margin: 10px 10px 0 0;

What would make this happen? How can I fix it?

This error occurs in Firefox 3.6


回答1:


Try adding overflow:auto to main div.



来源:https://stackoverflow.com/questions/3370342/css-float-bug-with-side-pane-resizing-main-content

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!