日期:2014-05-17  浏览次数:20629 次

求高手指点DIV+CSS样式问题
HTML code


<div style="width:100%; height:100px;">

<div style="?"></div>

</div>




上面的代码应该怎样修改成我想要的效果呢?

 第一个DIV宽度是百分百的,也就是浏览器多宽就多宽

 第二个DIV我想实现的样式是,左右距离第一个div的80px

注意要兼容浏览器 IE.GOOGLE.火狐。

希望高手帮忙下

------解决方案--------------------
HTML code

<div style="width:100%; height:100px;" id="div1">
div1
<div style="margin-left:80px; margin-right:80px" id="div2">div2</div>
div1
</div>