Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: CSS sticky menu

  1. #1
    New to the CF scene
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS sticky menu

    Hi!

    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/

    Br
    Drit

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Instead of margin-top, set bottom to them in CSS.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •