HTML table aligns images and text

In the sample article, I added the html table of the widh 2 table, the left column for images and the right column for description of images.

The problem is that the text description in the right column is under the images, it looks like the images cause the text to break into another line.

This is an example of the code I used:

<table>
<tr>
<td>Image.jpg</td>
<td>Image.jpg description</td>
</tr>
<tr>
<td>Image2.jpg</td>
<td>Image2.jpg description</td>
</tr>
</table>

Here you can see the problem on this page.

+3
source share
3 answers

You just need to add style="vertical-align:top"intd

Or vertical-align:middleif you want to put the text in the middle of the line

+7
source

Try this CSS in the text <TD>:

vertical-align:top;

i.e:.

<td style="vertical-align:top;">
   Trio: Quaisquer três cartas do mesmo valor. Este exemplo ...
</td>
0
source

, , , ? valign?

<table>
<tr>
 <td valign="top">January</td>
 <td valign="top">$100</td>
</tr>
<tr> 
<td valign="bottom">February</td>
 <td valign="bottom">$80</td>
   </tr>
</table>

Top, Bottom Center , .

0

All Articles