I have a very simple layout with two DIVS: the fixed width of the left panel and the right area, which should occupy 100% of the remaining width. Both heights are 100%, and I want the right element to have a vertical scrollbar if the height is above the height of the window.
My current code occupies the entire browser window, but the correct area scrolls towards the visible area of ββthe browser on the right, and the vertical scroll bar is never displayed.
HTML:
<body> <form id="Form2" runat="server"> <div class="page"> <div class="clear hideSkiplink"> Left side stuff goes here.... </div> <div class="main"> Right size stuff goes here.... </div> </div> </form> </body>
CSS
div.hideSkiplink { padding:20px; background-color:#990000; position:fixed; top:0px; left:0px; width:249px; height:100%; } div.main { padding: 10px; margin: 0px; background-color: #000000; color: #ffffff; position: fixed; top: 0px; left: 250px; width: 100%; height: 100%; }
source share