HTML table cell goes down when add text -
i have table this:
<table class="rds" cellspacing="15px"> <tr> <td id="r1"><a id="rx1" href="#"></a></td> <td id="r2"><a id="rx2" href="#"></a></td> <td id="r3"><a id="rx3" href="#"></a></td> <td id="r4"><a id="rx4" href="#"></a></td> </tr> </table>
and css file:
.rds { width: auto; margin-left:auto; margin-right:auto; } .rds tr td a:link, .rds tr td a:visited { display: block; width: 39px; height: 39px; background-image: url('images/bg.png'); background-repeat: no-repeat; background-position: center; } .rds tr td a:active, .rds tr td a:hover { display: block; width: 39px; height: 39px; background-image: url('images/bg.png'); background-repeat: no-repeat; background-position: center; opacity: 0.9; }
but when add text tags, cell goes down bit. cell text goes down.
what can do?
use vertical-align="top"
on cells. in css
td { vertical-align:top; }
Comments
Post a Comment