inserting problems in Dreamweaver
I have some problems with Dreamweaver, when I'm inserting new image with width 1000 pixels (for example) in the table with width 1000 pixels, I receive the following cell padding:
XXXXXXXXXXXXXXXXXXXXX
x
x -----------------
x |//here image
x |
x |
x
<body>
<table width="1000" align="center" bgcolor="#FFFFFF" class="main_border">
<tr>
<td><img src="./img/canyon.gif" width="1000" height="150" alt="hea开发者_StackOverflow中文版der"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><img src="img/footer.gif" alt="footer" width="1000" height="20" /></td>
</tr>
</table>
</body>
similar problem:
http://www.justskins.com/forums/problem-with-white-space-31439.html
can somebody explain why? thanks in advancems/problem-with-white-space-31439.html
This used to be called cellspacing
and cellpadding
which needed to be set to 0. In CSS, as per this answer:
table.main_border { border-collapse: collapse; }
table.main_border td { padding: 0;}
that should fix it. If it doesn't, please show your CSS as well (namely that of body
and main_border
).
As pointed out in the comments, using tables for layout is regarded a bad practice in most cases nowadays. Web designers are encouraged to use alternatives (should be very easy in this case).
精彩评论