我有一个内部DIV,只能在底部的父div之外传递。 我不愿意将mobileArea设置更改为我的Dreamweaver FGL.css的一部分
CSS:
#mobileArea {
clear: both;
float: left;
margin-left: 0;
margin-top: -1252px;
width: 100%;
width: calc(100% - 10px);
height: 830px;
display: block;
}
.mobileContent{
display: block;
height: auto;
margin-left:2px;
margin-right:2px;
margin-bottom: 0px;
overflow-y: auto;
overflow-x: hidden;
border: solid;
border-color: #1D7C06;
}
我已经尝试了所有事情的组合(除了正确的事情),并且无法理解为什么保证金底线不起作用。我打赌这很简单,但我找不到很多类似的帖子。
设置
<div id="mobileArea">
<div id="logo"> No Set Height as it needs to change in size</div>
<div id="links"> No Set Height as it needs to change in size</div>
<div id="content" class="mobileContent">displays after links on a new line OK,
but continues out of parent div.</div>
</div>
答案 0 :(得分:2)
我认为Missing Id只是一个TYPO
删除一些css属性
#mobileArea {
**clear: both;**Remove this line
....
....
}
希望这会起作用
答案 1 :(得分:0)
#mobileArea {
overflow: scroll;
overflow
的CSS样式需要应用于mobileArea
,而不是div
。
答案 2 :(得分:0)
这是您的网站吗? - http://www.allcoles.com/
这将修复位置并使移动主区域成为可滚动区域:
.mobileContent - remove position:absolute
#mobileMainArea - overflow:scroll;
当然,您可能希望将其放入媒体查询中,因为它看起来像706px的分页符号,您可以这样做:
@media all and (max-width: 706px){
.mobileContent - remove position:absolute
#mobileMainArea - overflow:scroll;
}
希望我能正确理解你的问题。