CSS Property Value How to - display: table; Make Two Floated CSS Elements the Same Height








Question

We would like to know how to display: table; Make Two Floated CSS Elements the Same Height.

Answer


<!--from  www . java  2s .  c o m-->
<!DOCTYPE html>
<html>
<head>
</head>
<body>
  <div style="display: table;">
    <div style="display: table-cell; border: 1px solid #CCC;">
      some text <br> another line <br> another line <br>
      another line
    </div>
    <div style="display: table-cell; border: 1px solid #CCC;">some
      other text</div>
  </div>
</body>
</html>

The code above is rendered as follows: