html - 2 column website sidebar full height -
i'm making 2 column webpage layout. wanna make border takes 100% of page height. have tried few different things alwys same result, adds border whenever there's content. has advice in this?
html
<body> <div id="top"> <nav> <a class="navitem" href="#">stream</a> <a class="navitem" href="/discover">discover</a> </nav> <form action="#" class="form-wrapper cf"> <input type="text" placeholder="search..." onfocus="this.placeholder = ''" onblur="this.placeholder = 'search...'" required> <button type="submit">search</button> </form> </div> <div id="wrapper"> <div id="content"> <h1> content</h1> </div> <div id="divider"></div> <aside> <h1>right bar</h1> <footer> <nav> <a class="navitem_footer" href="/contact">contact</a> <a class="navitem_footer" href="/about">about us</a> <a class="navitem_footer" href="/premium">premium</a> </nav> </footer> </aside> </div> </body>
css
#wrapper { width: 990px; margin-right: auto; margin-left: auto; } #content { width: 600px; float: left; } #divider { position: absolute; overflow: hidden; left: 900px; right: 0; top: 0; bottom: 0; border-left: 1px solid rgba(192,192,192,0.6); } aside { float:right; width: 390px; } footer { height: 50px; clear: both; position:fixed; bottom:0; }
thank in advance.
i got border working now, covering header & tried overflow hidden didn't work.
screenshot : http://i62.tinypic.com/2czbp6s.png
for can use tag can divide main page 2 columns , link html pages code:
<!doctype html> <html> <frameset cols="50%,50%" border="10" bordercolor=#ff0000> <frame src="first_page.html" frameborder="1"> <frame src="second_page.html" frameborder="1"> </frameset> </html>
and 100% border can use code:
<!doctype html public "-//w3c//dtd html 4.01//en"> <html> <head> <title>border around content</title> <style type="text/css"> * { margin: 0; padding: 0; } html, body { height: 100%; overflow: hidden; } #wrapper { position: absolute; overflow: auto; left: 0; right: 0; top: 0; bottom: 0; border: 5px solid red; } </style> <!--[if ie 6]> <style type="text/css"> #wrapper { width: expression((m=document.documentelement.clientwidth-10)+'px'); height: expression((m=document.documentelement.clientheight-10)+'px'); } </style> <![endif]--> </head> <body> <div id="wrapper"> <!-- large div scrollbars --> <div style="width: 9999px; height: 9999px; background: #ddd"></div> </div> </body> </html>
Comments
Post a Comment