Search code examples
htmlhtml-tablespace

How to get rid of space between html table?


How to get rid of these spaces between images? As you can see if I put images one after another there is no space and if I put below then there is a space. How do I resolve this?

http://imgur.com/CqwN2Ve

And here's the code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<style type="text/css">
.table{
border-collapse: collapse;
border-spacing:0;
}
</style>
</head>
<body>
<table width="805" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
<tr>
<td><img src="sutent/1.png"></td>
</tr>
<tr>
<td><img src="sutent/2.png"><img src="sutent/3.png"></td>
</tr>
<tr>
<td class="td1" ><img src="sutent/4a.jpg"><img src="sutent/5.png"><img src="sutent/8a.png"><img src="sutent/9a.png"><img src="sutent/13a.png"></td>
</tr>
<tr>
<td><img src="sutent/4b.png"><img src="sutent/6.png"><img src="sutent/8b.png"><img src="sutent/9b.png"><img src="sutent/13b.png"></td>
</tr>
</table>
</body>
</html>

Solution

  • Try remove . from the beginning of your declared class, and don't assign class to table

    as

    table{
    border-collapse: collapse;
    border-spacing:0;
    }