html - CSS menu that scrolls aside content -
how can make menu scroll aside content.
note content , menu inside container box(class=boxed) aligned center of page. above container there header 100% page width.
.boxed{ width:100%; max-width: 1154px; margin: 0 auto; position: relative; } .boxed .sidebar{ position: relative; width: 25%; float: left; }
the html this:
<html> <body> <header>header content</header> <div class="boxed"> <nav id="sidebarmenu"> <ul id="sidebar"> <li></li> <li></li> </ul> </nav> <div class="content">content</div> </div> </body </html>
html, body { height: 100%; margin: 0; font-size: 20px; } #left { width: 20%; height: 100%; position: fixed; outline: 1px solid; background: #f2f2f2; } #right { width: 80%; height: auto; outline: 1px solid; position: absolute; right: 0; background: #007dad; }
<div id="left"> <a href="link1">side menu 1</a><br/> <a href="link2">side menu 2</a><br/> <a href="link3">side menu 3</a><br/> </div> <div id="right">scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br />scroll <br /> </div>
Comments
Post a Comment