Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you make a floating sidebar like envato?

I really like the floating panel on the left side of the following site:

http://envato.com/

I have no idea what its called, but I like how when you click on the search button, it expands to a search page, you click on another icon, and it expands with what appears like its own page.

How do I accomplish this? Is there some tutorial out there using html5, JavaScript or jQuery?

NOTE: All the answers so far only cover the floating bar, but not the clicking on a link on that floating bar to show a window expanded to the right.

like image 257
Teviere Avatar asked Dec 01 '22 02:12

Teviere


2 Answers

<div id="float"></div>

#float{
    position:fixed;
    top:50px;
    left:0;
}

Check working example at http://jsfiddle.net/TVwAv/

like image 87
Hussein Avatar answered Dec 09 '22 23:12

Hussein


done using css,

HTML

<div id="floating_sidebar">
 whatever you want to put here
</div>

CSS

#floating_sidebar {
 position:fixed;
 left: 0;
 top: 100px; /* change to adjust height from the top of the page */
}
like image 32
Grigor Avatar answered Dec 09 '22 22:12

Grigor