-1

我在网页中遇到了一些奇怪的布局/定位问题。它主要与浮动的项目和不正确流动的容器边框有关。我试过清除和溢出:自动,隐藏,但它仍然不起作用。

提前非常感谢。

4

4 回答 4

0

添加以下CSS

.explore-inner:after{
    content: '.';
display: block;
overflow: hidden;
visibility: hidden;
font-size: 0;
line-height: 0;
width: 0;
height: 0;
clear:both;

}

因为“ul”有浮动它需要在“explore-inner”类之后被清除

于 2012-11-02T09:06:59.840 回答
0

实际上你已经使用floating了你的child div's不是cleared你的parent div's所以我已经把它给了overflow:hidden你的父母div所以它现在工作正常......

所以你可以css用我的更新你的,我希望这对你有用:-

CSS

.explore-inner {
    background: url("../images/inner-bg.png") repeat-x scroll 0 0 transparent;
    border-top: 1px solid #EBEBEA;
    overflow: hidden;
}
#team-message {
    background: url("../images/outer-bg.png") repeat-x scroll 0 0 transparent;
    clear: both;
    overflow: hidden;
    padding: 10px;
    width: 940px;
}
于 2012-11-02T09:09:06.463 回答
0

添加overflow: auto;.explore-inner

.explore-inner {
border: 1px solid #EBEBEA;
background: url(../images/inner-bg.png) repeat-x;
overflow: auto;
}
于 2012-11-02T08:49:11.057 回答
0

您的<ul>物品有浮动,这未正确清除。就在你有一个<ul>项目之后.explore-innerclear: both;

于 2012-11-02T08:50:52.540 回答