SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up How to build floating menu bar when scroll down? I saw from sitepoint

    How to code this? when I scrolled down site display black menu bar at the top look like float bar.


    Can you tell me how to do this?

    Thank you

  2. #2
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,798
    Mentioned
    34 Post(s)
    Tagged
    2 Thread(s)
    while not always a good idea, design wise. this is easily accomplished with:

    #menucontainer {position:fixed; top:0; height: 250px} /* am using pixels just so you know that the values must be equivalent to one another*/
    #firstElement {margin-top: 250px}

    hope that helps

  3. #3
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no no the purpose is learn how to build and I will recreate my menu not same sitepoint.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    There is some JavaScript involved in that menu, as it only appears when you scroll down the page.

  5. #5
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you tell me what kind of javascript you mention?

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,173
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Unfortunately, the page code is a bit too much of a mess for me to see exactly what code is doing that. But here is a recent article that shows the basic options for doing this:

    http://uxdesign.smashingmagazine.com...r-to-navigate/

  7. #7
    SitePoint Member
    Join Date
    Sep 2012
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you


Bookmarks

Posting Permissions

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