How do these Divs have the same height, but with their content they can be different?

Asked

Viewed 92 times

1

How to make the Divs below have the same height every time? The content is dynamic, time content of the first will be higher, time of the second, I could use Tables, but the content is not tabular.

<div style="border: solid; height: 200px;">
  <div style="border: solid; display: inline-block;">
    DIV1 LINHA 1
  </div>
  <div style="border: solid; display: inline-block;">
    DIV2 LINHA 1
    <br> DIV2 LINHA 2
    <br> DIV2 LINHA 3
  </div>
</div>

1 answer

-1

I think all the confusions and difficulties I had concerning height, positioning, responsiveness, etc, could be solved with the models of this link

I think the idea of tables is much more intuitive, but it’s obviously completely obsolete. So, in this link, it can generate classes that simulate a table, but with all the advantages of CSS.

  • I do not see the use of tables as obsolete, but as a purpose, Divs for divisions, Tables for tabular data, the detail is that the Divs do not respond as expected to human reasoning, it must be complex to program the browser to interpret with div the will of the user, for example a float on any object and the layout gets all messed up, he does not understand that the float is only for the object itself, he repositions everything after. The browser seems to make a direct and constant reading, because the position of the objects follows the sequence more than the order.

Browser other questions tagged

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