Fixed Fade Out Menu: A CSS and jQuery Tutorial

Inspired by David Walsh’s top navigation bar that gets semi-transparent when you scroll down the page, I decided to create a tutorial out of that idea. The aim is to […]

Browse amazing websites →

Discover fresh gems in our handpicked exhibition of standout websites that caught our eye.

Explore the Creative Hub →

Explore the latest open-source demos, experiments, and interactive ideas from the community.

Feedback 44

Comments are closed.
  1. hah! I was just looking at his blog again recently and was like ” man I gotta implement this for fun somewhere”

    Good looks! Awesome work.

  2. Pingback: 5 Unique & Creative Navigation Menus with Free Source | Webmaster Index

  3. Great tutorial! I really like the smooth fade and ‘mac’ like effect it has. Added this to TUTlist.com

  4. Hey!
    Great tut!
    Im not very good when it comes to java script, if i would like to make the menu fade when i scroll down and to the right what would i have to write to make that happen?

    Thanks for ur time and for the Tut!

  5. Pingback: 45 jQuery Navigation Plugins and Tutorials - Noupe

  6. Pingback: 45 jQuery Navigation Plugins and Tutorials | Google Reader | ????? ?????

  7. Pingback: 45 jQuery Navigation Plugins and Tutorials

  8. Pingback: Wordpress Blog Services - 45 jQuery Navigation Plugins and Tutorials

  9. Pingback: Online Marketing Connect — Blog — 45 jQuery Navigation Plugins and Tutorials

  10. Pingback: 45 jQuery Navigation Plugins and Tutorials | iDESIGN

  11. Pingback: 45 jQuery Navigation Plugins and Tutorials » IMvsMI blog

  12. Pingback: 45 jQuery Navigation Plugins and Tutorials - Interactive Middle East

  13. neat! the only issue i saw was that the menu faded out after you hit the go-to-bottom link, and wouldn’t fade back in unless you moved the mouse off and back on.

  14. hey, nyce post:)
    could you let me know is this the same way to add in wordpress theme 😕

  15. Nice. I had seen David Walsh’s top nav before. Glad to see someone decided to release a copy. I will probably use it in some upcoming projects.

  16. I will use this to show alerts on my website which I feel is the best way to use this. Thanks!

  17. Cool tutorial. I remember when google implement this and though it was a nice clean effect. Thanks for the posts. I’m looking forward to playing around with it.

  18. Hi there,
    I visited tympanus.net and i found really great tutorials. i tried few

    I also treid this one at my site but getting a prb.. prb is that my icons goes back to my other images.. I have inserted all image through css in my theme and icon of fadeout menu as well.. please review my site and tell me what do I do..

    Even though the css for fadeout menu, im using that at top in my theme and later others but I didnt solved my prb… you can see the prob in reader and when i scroll same happen when icom moves at rating stars 🙁

    • Hello Waqas,
      I can see that your menu gets hidden at the top, that’s because your nav element is one of the first in the html. Add this line to the CSS in order to make sure, the navigation is always on top of other elements
      z-index:999999;

      I hope it helps! Cheers, ML

  19. Thanks Mary,
    I tried your method, I’ve added
    z-index:999999; at the end of
    style.css (fadeout menu)
    but nothing happned 🙁

    I need to use this menu because of lack of space for menu…. So I think I will leave it as it is 🙁

    • Hi Waqas,
      you need to add the z-index:999999; line to the style definition of the #nav. Like this:
      #nav{
      height:35px;
      border-bottom:1px solid #ddd;
      position:fixed;
      top:0px;
      left:0px;
      right:0px;
      z-index:999999;
      }
      and then it will work. In the style.css the #nav item is the first one. I hope it helps! Cheers, ML

  20. Hi, this is a great little effect. But one thing I’ve noticed is that upon re-hover in IE8, the rollovers do not work.

    This is obviously another IE bug, but have you or can you think of any fix?

    Thanks

  21. I would like to have this feature in the bottom of my page, but when using
    position:fixed;
    bottom:0px;

    in IE8 the menu is not fixed in bottom only in FF.
    Is that prob to solve?

  22. Nice, but I need a menu where you hover one link, and the rest of the menu fades out. Any ideas or how to modify this script? Thanks

  23. I believe the Position: Fixed does not work in most versions of IE, I have not really read the Javascript part of the code above but it would be cool to add an IE hack for Position: Fixed to this tut.

  24. @INDIANA WEBDESIGNER

    You can easily do that using Jquery.

    I can’t post the code here due to time but i think you’ll find something similar on Smashing Magazine.

    Run a search or on Css-Tricks.com

  25. I love your work. I watched the demo on my mac with safari and firefox but when I viewed it on my iPad the menu scrolls off the page?! Has anyone else found this bug?

  26. Great tutorial!

    The only gripe is, like Fil said, if you click a button you have to move off the menu and on again for it to fade in. Has anyone worked out the little extra code to fix this? I’m looking to add it to my new site and would like to remove this bug if possible!

    Thanks!!

  27. As soon as I asked I fixed it! Typical. If anyone is interested here is the extra code to add to the javascript:

    $(‘#nav’).mouseover(
    function(e) {
    $(‘#nav’).stop().animate({‘opacity’:’1′},400);
    }
    );

  28. http://www.handbagsonsales.com

    Chanel Handbags

    Gucci Handbags Gucci 2010 New Handbag

    Hermes Handbags

    Balenciaga Handbags

    Bottega Veneta Handbags

    Chloe Handbags

    Coach Handbags

    Dior Handbags

    Fendi Handbags

    Dolce & Gabbana Handbags

    Hermes Handbags

    Versace Handbags

    Prada Handbags

  29. Hi, this is a great little effect. But one thing I’ve noticed is that upon re-hover in IE8, the rollovers do not work.

    This is obviously another IE bug, but have you or can you think of any fix?

    Thanks

    is there any bugfixing to solve this problem?

  30. The only gripe is, like Fil said, if you click a button you have to move off the menu and on again for it to fade in. Has anyone worked out the little extra code to fix this? I’m looking to add it to my new site and would like to remove this bug if possible!

  31. thank you for this beautiful theme and also for making web publishing possible for design-challenged people like me!

  32. i am using platform pro theme for wordpress

    i am tried to add this fixed fade out manu but i am not get success because i dont have kowladge to how to add it

    firstly i added following code

    in header



    Link 1
    Link 2
    Link 3
    Link 4
    Link 5
    Link 6

    $(function() {
    $(window).scroll(function(){
    var scrollTop = $(window).scrollTop();
    if(scrollTop != 0)
    $(‘#nav’).stop().animate({‘opacity’:’0.2′},400);
    else
    $(‘#nav’).stop().animate({‘opacity’:’1′},400);
    });

    $(‘#nav’).hover(
    function (e) {
    var scrollTop = $(window).scrollTop();
    if(scrollTop != 0){
    $(‘#nav’).stop().animate({‘opacity’:’1′},400);
    }
    },
    function (e) {
    var scrollTop = $(window).scrollTop();
    if(scrollTop != 0){
    $(‘#nav’).stop().animate({‘opacity’:’0.2′},400);
    }
    }
    );
    });

    now i am not getting where to add

    followig code

    #nav{
    height:35px;
    border-bottom:1px solid #ddd;
    position:fixed;
    top:0px;
    left:0px;
    right:0px;
    background:#ffffff url(http://www.gundya.com/wp-content/uploads/nav.png) repeat-x center left;
    z-index:999999;
    }

    #nav ul{
    height:25px;
    list-style:none;
    margin:6px auto 0px auto;
    width:600px;
    }
    #nav ul li{
    display:inline;
    float:left;
    margin:0px 2px;
    }

    #nav a{
    font-size:11px;
    font-weight:bold;
    float:left;
    padding: 2px 4px;
    color:#999;
    text-decoration: none;
    border:1px solid #ccc;
    cursor: pointer;
    background:transparent url(http://www.gundya.com/wp-content/uploads/overlay.png) repeat-x center left;
    height:16px;
    line-height:16px;
    }
    #nav a:hover{
    background:#D9D9DA none;
    color: #fff;
    }

    #nav a.top span, #nav a.bottom span{
    float:left;
    width:16px;
    height:16px;
    }
    #nav a.top span{
    background:transparent url(http://www.gundya.com/wp-content/uploads/top.png) no-repeat center center;
    }
    #nav a.bottom span{
    background:transparent url(http://www.gundya.com/wp-content/uploads/bottom.png) no-repeat center center;
    }

    #nav ul li.search{
    float:right;
    }
    #nav input[type=”text”]{
    float:left;
    border:1px solid #ccc;
    margin:0px 1px 0px 50px;
    padding:2px 2px 2px 2px;
    }

    input.searchbutton{
    border:1px solid #ccc;
    padding:1px;
    cursor:pointer;
    width:30px;
    height:22px;
    background:#E8E9EA url(http://www.gundya.com/wp-content/uploads/search.png) no-repeat center center;
    }
    input.searchbutton:hover{
    background-color:#D9D9DA;
    }

    please tell me on which file and with step by step

    THANKS FOR GREAT WORK !