I am looking for programming help on how to do a sidebar menu like the one shown at this URL:
Nettuts Website Link
I would like my sidebar to function just like the sidebar on the website, with my own look and feel applied to it. I would like the sidebar to scroll with the page fixed at its own location just as it functions on Nettuts
website. How would I program this?
It is a div
with the css statement position: fixed;
in the css class declaration.
Give any div in your html this CSS styling and you should see it working.
position: fixed;
height: 132px;
left: 0;
top: 185px;
width: 24px;
that side bar is nothing more than a div with a fixed position.
<style>
.sidebar {
width: 45px;
height: 90px;
position: fixed;
left: 0px;
top: 300px;
border: 1px solid black;
}
</style>
<div class='sidebar'>I'm a sidebar</div>
http://jsfiddle.net/p8dFM/
At that point you add elements to the sidebar with whatever functionality you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With