2016-01-22 102 views
2

所以我想删除多余的空格用红墨水强调如下所示: http://i.stack.imgur.com/d7Kwo.png如何删除图像周围的空白表中的

当我删除顶部图像表格的宽度变成正确的:800像素

但我想是这样的:http://i.stack.imgur.com/XPsz2.jpg

这里是我当前的代码:

<html> 
<head><title>Adventure</title> 
<link rel="stylesheet" type="text/css" href="STYLE04.css"> 
</head> 
<body> 
<table style="width:800px; height:600px" > 
    <tr> 
    <td colspan=3><img src="N13BANNER.PNG"></td> 
    <td><img src="N13LOGO.PNG"></td> 
</tr> 
<tr> 
    <td style="width:176px"><img src="N13BUTTON1.PNG"></td> 
    <td width=176><img src="N13IMG5.jpg"></td> 
    <td colspan=2 rowspan=6><img src="DUNE204.jpg"></td> 
</tr> 
<tr> 
    <td width=176><img src="N13BUTTON2.PNG"></td> 
    <td width=176><img src="N13IMG1.jpg"></td> 
</tr> 
<tr> 
    <td width=176><img src="N13BUTTON3.PNG"></td> 
    <td width=176><img src="N13IMG4.jpg"></td> 
</tr> 
<tr> 
    <td width=176><img src="N13BUTTON4.PNG"></td> 
    <td width=176><img src="N13IMG9.jpg"></td> 
</tr> 
<tr> 
    <td width=176><a href="mailto:[email protected]?Subject=Adventure%20Me%20Up..."><img src="N13BUTTON5.PNG"></a></td> 
    <td width=176><a href="mailto:[email protected]?Subject=Adventure%20Me%20Up..."><img src="N13IMG6.jpg"></a></td> 
</tr> 
<tr> 
    <td colspan=2><h1>Webpage last edited by asdf</h1></td> 
</tr> 
</table> 
</body> 
</html> 
+0

你真的应该考虑不使用布局表格元素。你真的需要吗? – LGSon

回答

1

代码S充足的,没有图像更新你的表格布局。

这是你想要的吗? ...然后你的图像变大,并推动细胞过宽。

table { 
 
    width: 800px; 
 
} 
 
td { 
 
    background-color: gray; 
 
    width: 20%; 
 
    height: 85px; 
 
} 
 
tr:last-child td { 
 
    height: 40px; 
 
} 
 
img { 
 
    vertical-align: top; 
 
}
<table> 
 
<tr> 
 
    <td colspan=4></td> 
 
    <td></td> 
 
</tr> 
 
<tr> 
 
    <td></td> 
 
    <td></td> 
 
    <td colspan=3 rowspan=6></td> 
 
</tr> 
 
<tr> 
 
    <td></td> 
 
    <td></td> 
 
</tr> 
 
<tr> 
 
    <td></td> 
 
    <td></td> 
 
</tr> 
 
<tr> 
 
    <td></td> 
 
    <td></td> 
 
</tr> 
 
<tr> 
 
    <td><a href="mailto:[email protected]?Subject=Adventure%20Me%20Up...">mail</a></td> 
 
    <td><a href="mailto:[email protected]?Subject=Adventure%20Me%20Up...">mail</a></td> 
 
</tr> 
 
<tr> 
 
    <td colspan=2>Webpage last edited by asdf</td> 
 
</tr> 
 
</table>

+0

尝试过,但没有工作 – asdftestonly

+0

@asdftestonly我做了更新,请回复,并张贴您的CSS。 – LGSon