Spacing between image in HTML table -
i wasting lot of time doing simple thing:
i want show image , want show same image under previous one. i've put 2 image in table, have strange space under image.
this simple code:
<!doctype html> <html> <head> <link href="style_new.css" rel="stylesheet" type="text/css"> </head> <body> <?php echo "<table class=\"top\">"; echo "<tbody>"; echo "<tr><td class=\"t_top\"><img src=\"try.png\" vspace=\"0px\"/></td></tr>"; echo "<tr><td class=\"t_top\"><img src=\"try.png\" vspace=\"0px\"/></td></tr>"; echo "</tbody>"; echo "</table>"; ?> </body> </html>
and relative style sheet:
table.top { border-spacing:0px; border:0px; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; border-spacing: 0px; } img.top { border-spacing:0px; border:0px; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; } td.t_top { border-spacing:0px; border:0px; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; } tr.t_top { border-spacing:0px; border:0px; margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; }
my image have height 58px. i've tried check on various browser , spaces still there. i'have pixel of space down image , <td>
border (that i've put check), have <td>
, <tr>
object 62px img object 58px
can remove spaces?
there 3 ways discussed in answered question.
set img
display:block;
or set
lineheight 0px;
or set
vertical alignment top.
i don't know best way link existing question. havent paid attention. explaination can given if asked.
i found it: where blank space coming from?
Comments
Post a Comment