为什么我设置了这个div的margin-top:20px;可是还是和上一个div挨着?
<divid="rightside"><p>```</p></div><divid="footer"><pclass="footer-text">Copyright201...
<div id="rightside">
<p>```</p>
</div>
<div id="footer"><p class="footer-text">Copyright 2011 - Shears Design Studio</p></div>
css:
#rightside {width:200px;float:right;}
#footer {clear: both; margin-top:20px; padding-bottom:20px; padding-top:10px; border-top:1px #ccc solid;}
.footer-text {font-size:100%; font-weight:bold; color:#000; text-align:center;}
如图: 展开
<p>```</p>
</div>
<div id="footer"><p class="footer-text">Copyright 2011 - Shears Design Studio</p></div>
css:
#rightside {width:200px;float:right;}
#footer {clear: both; margin-top:20px; padding-bottom:20px; padding-top:10px; border-top:1px #ccc solid;}
.footer-text {font-size:100%; font-weight:bold; color:#000; text-align:center;}
如图: 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询