溢出:自动导致Safari中显示滚动条/滚动条
||
我有一个容器div(#columnsOne),设置为920px + 38px填充+ 2px边框,总宽度为960px。
(#columnsOne)使用CSS \“ overflow:auto; \”垂直扩展并包含其中的所有内容。
这适用于所有浏览器以垂直扩展div,也可以在Firefox,Chrome和IE7 / 8上正确显示水平宽度。但是,在Safari上,出现水平滚动,并向右滚动约600像素的空白。
起初,我以为我可能将边距/填充设置错误,这就是为什么它可能会正确扩展的原因,但是我不可能在那里有600px的额外空间。
关于为什么会发生这种情况的任何想法?
http://www.timetoplaymag.com/giveaway/daily/
屏幕快照(新用户,所以我不能在这里发布):http://www.timetoplaymag.com/stacko/
许多编辑试图在这里获取代码,新手,对不起
<div class=\"columnsOne\">
<div class=\"sectionLeft\">
image/name of giveaway are here
</div>
<div class=\"sectionRight\">
sign in form here
</div>
</div>
#columnsOne, .columnsOne {
clear: both;
width: 958px;
margin-right: auto;
margin-left: auto;
margin-top: 10px;
margin-bottom: 20px;
background-color: #FFFFFF;
height: auto;
border: 1px solid #77787b;
border-radius: 10px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
padding: none;
overflow: auto;
}
#columnsOne .sectionLeft, .columnsOne .sectionLeft {
float: left;
height: auto;
width: 590px;
background-color: #FFFFFF;
overflow: auto;
margin-top: 0px;
margin-right: 20px;
margin-bottom: 0px;
margin-left: 0px;
padding-top: 19px;
padding-right: 19px;
padding-bottom: 19px;
padding-left: 19px;
}
#columnsOne .sectionRight, .columnsOne .sectionRight {
height: auto;
width: 270px
padding: 0px;
margin: 0px;
overflow: auto;
padding-top: 19px;
padding-right: 19px;
padding-bottom: 19px;
padding-left: 19px;
}
没有找到相关结果
已邀请:
2 个回复
掀辟髓观粟
捐焦
是在此处使用的正确解决方案-您可能需要阅读浮点数以及它们如何控制文档流。 但是,我确实注意到在
上禁用width属性时,多余的空间消失了。