2016-01-22 106 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