function AdjustColumnsHeight() { // get a reference to the two DIVS that make up the columns var centerCol = window.document.getElementById('centercol'); var leftCol = window.document.getElementById('leftcol'); // calculate the max height var hCenterCol = centerCol.offsetHeight; var hLeftCol = leftCol.offsetHeight; var maxHeight = Math.max(hCenterCol, hLeftCol); // set the height of all 2 DIVS to the max height centerCol.style.height = maxHeight + 'px'; leftCol.style.height = maxHeight + 'px'; }
<div id="container"> <div id="leftcol"> <leftMenu:Leftmenue ID="leftMenu1" runat="server" /> </div> <div id="container2"> <div id="centercol"> <asp:ContentPlaceHolder id="MainContent" runat="server"> /asp:ContentPlaceHolder> </div> </div> </div>
<form id="form1" runat="server"> </form>
ctl00_
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)