1
I have this code:
<!DOCTYPE html>
<html>
<head>
<title>Figuras em tabelas</title>
</head>
<body>
<h1 align="center">Montando figuras com tabelas - 1</h1>
<table border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td rowspan="3"><img src="img/verde.gif"></td>
<td colspan="2"><img src="img/amarelo.gif"></td>
<td rowspan="2"><img src="img/azul.gif"></td>
</tr>
<tr>
<td rowspan="2"><img src="img/azul.gif"></td>
<td><img src="img/vermelho.gif"></td>
</tr>
<tr>
<td><img src="img/vermelho.gif"></td>
<td><img src="img/cinza.gif"></td>
</tr>
</table>
</body>
</html>
that is generating this layout:
Is it possible to remove these spaces between images?. I have tried resizing them but it is no use.
The separate images:
It did not help the margin, I have tried in all browsers, even so they do not align, if I join them in an image editor, they align correctly, but not in the code.
– Samuel Carvalho
Wouldn’t the size of the images interfere with the resize of the columns? for example if the blue image on the right is greater q the height of the red and yellow together, or the blue segment is greater than the red two, the table probably fits. Try to put the complete code with images and everything else. The green image is much bigger than blue+yellow or yellow+red+red. Have you thought about using
divs
withfloat left
?– Michel Simões
I added the separate images to the topic. I have to use only
table
, can’t usediv
;– Samuel Carvalho
That’s right, man! It’s the size of the pictures... Ex: if yellow and red are 51px high ("lying down"), the ideal is that green is 153px, which would be 3x51. and the rest keep 102px, to equal 2x51. Forehead ai.
– Michel Simões
It’s no use, it only gets worse. One thing I realized is that the
td
are bigger than theimg
, but if I set aheight
to thetd
, its size remains larger than the image.– Samuel Carvalho
The table is "stretching" because of the larger images. copies the code q posted ai and Voce will understand. the height I used in the image, but the ideal is that I resize them.
– Michel Simões
It worked, I fixed the size of the images and everything was ok, Thank you!
– Samuel Carvalho