Search code examples
cssimagegaps-in-visuals

Space between anchor image within table data


Table data has border and a link image and some other anchor text below it.

The problem is it has space between link, the solution I get from this here simply use vertical-align which remove the gap between anchor (which works) but in my case it create a gap between border-top td border and anchor image instead. Using clear both doesnt work too. Any idea?

  <td style="font-size:14px;border:1px solid #848484;font-weight: bold;">
      <a target="_BLANK" href=""><img style="border:none;" src="clothing.jpg" alt="Female Clothing"/></a>
      <a target="_blank" href="">&nbsp; &raquo;  Sub Men</a>
   </td>

Solution

  • I found out that I have to use both vertical align and display block in order to fix it.