我想要所有图片都在640宽度里,现在有图片超出了这个范围,请麻烦高手看看,代码哪里出了问题?
<style>
*{margin:0; padding:0}
body{
margin:0;
width: 640xp;
}
a{text-decoration:none;}
#container{max-width:640xp;margin:0 auto;font-family:微软雅黑; font-size:12px; line-height:1.5; text-align:left; color:#000; background:#efefef; padding-top:42px;}
#container img{ display:block; border:none;}
/*common*/
#commonTop{ width:640px; height:42px; margin:0 auto; position:fixed; top:0; left:0;z-index: 10;}
#commonTop .head{max-width:640px; height:42px;margin:0 auto;background:#f8f8f8;position:relative; text-align:center; font:normal 16px "微软雅黑"; color:#eb1212; line-height:42px;}
#commonTop .head a{width:38px; height:38px; display:block; position:absolute; top:2px; left:0;background:url(images/btnBack.png) no-repeat 0 0;background-size: 38px 38px;}
#commonTop .head a.share { background: url("images/shareIco.png") no-repeat center center; background-size: 23px 18px; left: auto; right: 5px; }
</style>
<body >
<iframe style="position: absolute;" src="http://img01.mall.cmbchina.com/thirdpartystatistics/index.html" width="0" height="0"></iframe>
<header id="commonTop">
<div class="head">
<a href="#" onClick="javascript:window.location.href = 'cmblife://popweb';"></a>
XXXX <a href="javascript:;" class="share" onClick="doShare();"></a> </div>
</header>
<section id="container">
<table width="640xp" border="0" cellspacing="0" cellpadding="0" align="center" style="width:640px;">
<tr class="container">
<td>
<img src="images/01.jpg" alt="" width="100%" border="0"></td>
</tr>
<tr>
<td>
<img src="images/02.jpg" alt="" width="100%" border="0"></td>
</tr>
<tr>
<td><a href="http://mall.cmbchina.com" target="_blank"><img src="images/p01.jpg"></a></td>
</tr>
<tr>
<td><a href="http://mall.cmbchina.com" target="_blank"><img src="images/p02.jpg"></a></td>
<td><a href="http://mall.cmbchina.com" target="_blank"><img src="images/p03.jpg"></a></td>
</tr>
<tr>
<td><a href="http://mall.cmbchina.com" target="_blank"><img src="images/p04.jpg"></a></td>
<td><a href="http://mall.cmbchina.com" target="_blank"><img src="images/p05.jpg"></a></td>
</tr>
请无视下面我自己发的2个回帖吧,看正文即可
首先把你的几处xp改为px,图片被挤到右边应该是第一排第二张图高度高于第一张
部分代码贴里没有显示,重新发下
body{
margin:0;
width: 640xp;
}
a{text-decoration:none;}
#container{max-width:640xp;margin:0 auto;font-family:微软雅黑; font-size:12px; line-height:1.5; text-align:left; color:#000; background:#efefef; padding-top:42px;}
#container img{ display:block; border:none;}
/*common*/
#commonTop{ width:640px; height:42px; margin:0 auto; position:fixed; top:0; left:0;z-index: 10;}
#commonTop .head{max-width:640px; height:42px;margin:0 auto;background:#f8f8f8;position:relative; text-align:center; font:normal 16px "微软雅黑"; color:#eb1212; line-height:42px;}
#commonTop .head a{width:38px; height:38px; display:block; position:absolute; top:2px; left:0;background:url(images/btnBack.png) no-repeat 0 0;background-size: 38px 38px;}
#commonTop .head a.share { background: url("images/shareIco.png") no-repeat center center; background-size: 23px 18px; left: auto; right: 5px; }
部分代码贴里没有显示,重新发下
body{
margin:0;
width: 640xp;
}
a{text-decoration:none;}
#container{max-width:640xp;margin:0 auto;font-family:微软雅黑; font-size:12px; line-height:1.5; text-align:left; color:#000; background:#efefef; padding-top:42px;}
#container img{ display:block; border:none;}
/*common*/
#commonTop{ width:640px; height:42px; margin:0 auto; position:fixed; top:0; left:0;z-index: 10;}
#commonTop .head{max-width:640px; height:42px;margin:0 auto;background:#f8f8f8;position:relative; text-align:center; font:normal 16px "微软雅黑"; color:#eb1212; line-height:42px;}
#commonTop .head a{width:38px; height:38px; display:block; position:absolute; top:2px; left:0;background:url(images/btnBack.png) no-repeat 0 0;background-size: 38px 38px;}
#commonTop .head a.share { background: url("images/shareIco.png") no-repeat center center; background-size: 23px 18px; left: auto; right: 5px; }
</style>
<body >
<iframe style="position: absolute;" src="http://img01.mall.cmbchina.com/thirdpartystatistics/index.html" width="0" height="0"></iframe>
<header id="commonTop">
<div class="head">
<a href="#" onClick="javascript:window.location.href = 'cmblife://popweb';"></a>
XXXX <a href="javascript:;" class="share" onClick="doShare();"></a> </div>
</header>
<section id="container">
<table width="640xp" border="0" cellspacing="0" cellpadding="0" align="center" style="width:640px;">
<tr class="container">