邊距的問(wèn)題,哪位大神幫忙看一下?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<style type="text/css">
*{margin:0;padding:0;}
#wrap{width:770px;margin:0 auto;}
#top{width:100%;height:100px;border:1px solid red;}
#mybody{width:100%;height:500px;border:1px solid blue;}
#foot{width:100%;height:200px;border:1px solid green;}
img{margin:10px 18px;border:1px solid #999;}
.content{border:4px solid #def4f5;padding:74px 15px;width:770px;}
.book{background:url(../%E7%BD%91%E9%A1%B5%E5%B8%83%E5%B1%80%E5%9F%BA%E7%A1%80/case2/images/t_book.gif) no-repeat #def4f5;}
</style>
</head>
<body>
? <div id="wrap">
? ? <div id="top"></div>
? ? <div id="mybody">
? ? ? <div class="content book">
? ? ? ? <img src="../網(wǎng)頁(yè)布局基礎(chǔ)/case2/images/book1.jpg" width="80" height="80" alt=""/>
? ? ? ? <img src="../網(wǎng)頁(yè)布局基礎(chǔ)/case2/images/book2.jpg" width="80" height="80" alt=""/>
? ? ? ? <img src="../網(wǎng)頁(yè)布局基礎(chǔ)/case2/images/book3.jpg" width="80" height="80" alt=""/>
? ? ? ? <img src="../網(wǎng)頁(yè)布局基礎(chǔ)/case2/images/book4.jpg" width="80" height="80" alt=""/>
? ? ? ? <img src="../網(wǎng)頁(yè)布局基礎(chǔ)/case2/images/book5.jpg" width="80" height="80" alt=""/>
? ? ? </div>
? ? </div>
? ? <div id="foot"></div>
? </div>
</body>
</html>
2016-11-15
一樓正確,本身有border和padding,寬度要設(shè)只能設(shè)置732。要么就不設(shè)或auto
2016-11-10
第13行,width:770px 改成?width:auto 你試下