I created a skinny CSS class that has no margins, padding, or borders:
.skinny { margin:0 0 0 0; padding:0 0 0 0; border:0 0 0 0; }
And I applied it to a line containing an image that also has a skinny class applied to it:
<td width="33%" align="center" class="skinny"> <table width="400px" height="180px" class="skinny"> <tr class="skinny"> <td class="skinny" width="60px" height="100px"><a class="skinny" href="/"><img class="skinny" width="60px" height="100px" id="snapshot" src="/images/snapshot.png"></a></td> <td class="skinny" width="120px" height="100px"><a class="skinny" href="/"><h1 class="skinny">Product</h1></a></td> </tr> </table> </td>
I am trying to get the image as close as possible to the text <h1> in the next cell so that they are shifted against each other, from left to right.
But no matter how many elements I apply to the skinny class, it looks like something like โfillingโ around each cell in the table, which creates a space between the image and the text.
How to remove this?
html css margin tablelayout
Brian mcinerney
source share