Reputation: 99
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?
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>
Upvotes: 0
Views: 13397
Reputation: 11
I know this is an old question, but I thought I'd throw in my input in case it helps someone. Sometimes I run into issues with the font-size or line-height being to big - they can create spaces between table cells even if there is no text. Maybe you ought to look into that.
Upvotes: 1
Reputation: 9040
<style type = "text/css">
tr
{
margin:0;
padding:0;
}
td
{
margin:0;
padding:0;
}
table
{
cellspacing:0;
cellpadding:0;
}
</style>
Upvotes: 2
Reputation: 2553
Try remove .
from the beginning of your declared class, and don't assign class to table
as
table{
border-collapse: collapse;
border-spacing:0;
}
Upvotes: 2