How to create a sidebar scroll or static menu

I am looking for help on how to make the sidebar menu as shown in this url:

Link to Nettuts Website

I would like my sidebar to function just like the sidebar on a website, with my own look and feel. I would like the sidebar to scroll through a page fixed at its own location, just like it works on the Nettuts website. How do I program this?

+4
source share
3 answers

This is a div expression with css position: fixed; in the css class declaration.

Give any div in html this CSS style and you will see that it works.

 position: fixed; height: 132px; left: 0; top: 185px; width: 24px; 
+15
source

this sidebar 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 this point, you add elements to the sidebar with whatever functionality you want.

+7
source

Create a style class, for example ..

 .class{ overflow:auto; height:100%; width:354px; top:185px; } 
0
source

All Articles