Cell spacing at right

Asked

Viewed 42 times

-1

I need to align an image to the left and a text to the center, but on the same line. The code I used was using tables, which is not necessary, but I thought it would help:

<table>
  <tr>
    <td><img  width="40" height="40" src="comeback.jpg"/></td>
    
    <td> Banana é bom</td> 
  </tr>
 
</table>

but I can’t center the text, even with the table spacing. How do I solve?

1 answer

0


Oops, I hope this can help you.

<table style="width: 100%;">
    <tbody>
      <tr>

        <td width="50"><img width="40" height="40" src="comeback.jpg"></td>

        <td style="text-align: center;"> Banana é bom</td> 
      </tr>
     </tbody>
</table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.