以下のデモを参照してください
デモはここをクリック
HTML
<div class="wrapper">
<div id="terms">
<center><a href="terms.html">Terms & Conditions</a></center>
</div>
</div>
CSS
.wrapper{
width:500px;
height:500px;
}
#terms {
position: fixed;
bottom:5px;
width: 100%;
left:0px;
height:25px;
}
コメントに従って更新:
クリックしてデモ 2
HTML
<div class="wrapper">
<div class="pageBox">
<p>
This is test page height will be managed accordingly and footer will be attached after this box.
</p>
<p>
This is test page height will be managed accordingly and footer will be attached after this box.
</p>
<p>
This is test page height will be managed accordingly and footer will be attached after this box.
</p>
<p>
This is test page height will be managed accordingly and footer will be attached after this box.
</p>
<p>
This is test page height will be managed accordingly and footer will be attached after this box.
</p>
</div>
<div id="terms">
<center><a href="terms.html">Terms & Conditions</a></center>
</div>
</div>
CSS
.wrapper{
width:500px;
}
.pageBox{
height:auto;
}
#terms {
width: 100%;
height:25px;
}