How to implement two stretching blocks? That is, if there is more content in one, then the second is the highest in height and vice versa ...

<div class="nav"> <div class="prev"> <a href=""></a> </div> <div class="next"> <a href=""></a> </div> </div> .next a, .prev a { display: block; height: 90px; } .prev { float: left; width: 380px; } .next{ margin-left: 380px; } 

Now there is such a fixed option, help make it rubber :)

    3 answers 3

    4 ways to make blocks of the same height

      Columns of the same height

        JavaScript + jQuery:

          $(document).ready(function() { function setEqualHeight(columns) { var tallestcolumn = 0; columns.each( function() { currentHeight = $(this).height(); if(currentHeight > tallestcolumn) { tallestcolumn = currentHeight; } } ); columns.height(tallestcolumn); } setEqualHeight($("элементы, которые нужно сделать одинаковой высоты(пример: #sidebarL, #content, #sidebarR)")); });