当缩放时,如何让我的绝对底部容器保持静止?

时间:2014-09-03 12:41:26

标签: html css layout positioning absolute

我想知道当有人放大或缩小时我怎么能阻止这个底部文字移动。到目前为止,页面的其余部分保持不变,但因为我必须使用position:absolute来使这个特定部分保持在另一个div(内容)的底部,现在它会移动。

#content {
border: 2px solid;
border-radius: 10px;
border-color:#ffffff;
box-shadow: 3px 3px 3px #999999;
}

#bottomsectioncontainer {
position:absolute;
bottom:0;
padding-left:200px;
padding-right:275px;
}
<div id="container2" style="width:1300px; height;975px; margin:auto">

<div id="content" style="background-color:#ffffff; height:975px";>

<!---content--->

<div id="bottomsectioncontainer" style="height: 5px; margin:auto;">


<div id="bottom1" style="width: 250px; float:left">


<h4 class="h4"> Example </h4>
<p class=bottompara>One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>

</div>


<div id="bottom2" style="width: 250px;float:left">

<h4 class="h4"> Example </h4>
<p class=bottompara>One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>


</div>

<div id="bottom3" style="width: 250px; float:left;">

<h4 class="h4"> Example </h4>
<p class="bottompara">One thing <br>
Two Thing<br>
Three thing<br>
Four Thing<br>
Five Thing<br>
</p>


</div>

</div>
</div>



</body>

</html>

http://tinypic.com/r/wwi35l/8

2 个答案:

答案 0 :(得分:0)

position:relative;
#content中的

将解决该问题

并从底部容器中删除height:5px

答案 1 :(得分:0)

#content {
    position:relative;
}