View Full Version : CSS sticky menu

Apr 26th, 2011, 04:55 PM

I'm making a webpage and I don't know how to make the div-tags "sticky".

I have a page with 2 columns. Left is menu and right is content.

I want the menu (left column) to be sticky in the bottom of the browser (always visible and independent of screen size/resolution) and the right (content column) to be scrollable.

Last, I want 40 px space from top and bottom of the browser (with same background color as the rest of the page), so that the content has distance from top/bottom...

You can see a mockup here: http://www.haavardhomstvedt.com/new/


Apr 27th, 2011, 09:40 AM
Instead of margin-top, set bottom to them in CSS.