Two tables of the same height

I want the two tables to be the same height. If the left table contains longer text than the right table, I want it to be as long as the left table.

Here's what it looks like now:

enter image description here

I cannot set the height because it will limit the amount of text you can write ...

Here is how I want it:

enter image description here

code:

<table cellspacing="0" width="30%" align="left" class="rowA">
<tr>
    <td>
    Sed ut perspiciatis unde omnis iste natus error sit voluptatem 
    accusantium doloremque laudantium, totam rem aperiam, eaque ipsa 
    quae ab illo inventore veritatis et quasi architecto beatae vitae dicta 
    sunt explicabo. "Sed ut perspiciatis unde omnis iste natus error sit 
    voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque 
    ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae 
    dicta sunt explicabo. 
    </td>
</tr>
</table>

<table cellspacing="0" width="70%" align="right" class="rowB">
<tr>
    <td>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do 
    eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut 
    enim ad minim veniam, quis nostrud exercitation ullamco laboris 
    nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor 
    in reprehenderit in voluptate velit esse cillum dolore eu fugiat
    nulla pariatur. Excepteur sint occaecat cupidatat non proident, 
    sunt in culpa qui officia deserunt mollit anim id est laborum.
    </td>
</tr>
</table>
+3
source share
1 answer

Can you use two adjacent cells instead?

<table>
  <tr>
    <td style="width: 30%">Left Column</td>
    <td style="width: 70%">Right Column</td>
  </tr>
</table>

- ... , - , divs tables, , , jQuery script, , . , min-height .

+4

Source: https://habr.com/ru/post/1702541/


All Articles