SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    820
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    responsive nav..... need position:fixed......

    I think these, which were pointed out to me by someone on another thread here a few days ago, are very useful....
    http://www.websitecodetutorials.com/...center-nav.php


    however, one problem: I tried examples 4, 5, & 6... they all work fine until........... I set the nav to position:fixed, which is what I need because I need the nav to stay put when user scrolls down the page.... is there a way to make any of these work with position:fixed?

    thank you...

  2. #2
    SitePoint Wizard bronze trophy chris.upjohn's Avatar
    Join Date
    Apr 2010
    Location
    Melbourne, AU
    Posts
    2,192
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    I tried a few examples using fixes positions and they all worked fine, do you have an example website/code we can see?

  3. #3
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    820
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    thank you for your response...

    here's one without setting position to fixed...
    http://mayacove.com/dev/rd/nav_demo4.html
    (i.e., pretty much the the orig example....)

    here's one with the top nav set to position:fixed...
    http://mayacove.com/dev/rd/nav_demo4_fixed.html

    the only difference betw the two is the position setting for the #nav....

    thank you.......

  4. #4
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,534
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    I have not been following this issue, but on the surface it seems that the following code included in either example shown it would fix the menu to the top of the window, if that's what you want.
    Code:
    #nav {
        position:fixed;
        top:0;
        left:0;
        right:0;
    }

  5. #5
    SitePoint Guru
    Join Date
    Jun 2009
    Posts
    820
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    oh my gosh.. this is awesome!! responsive, centered, fluid, fixed..:-) what more do I want? ;~))

    thank you so much....

    (do you have IE handy? ;-) could you see if it works in IE please if you do...
    http://mayacove.com/dev/rd/nav_demo4_fixed.html

    thank you so much....

  6. #6
    SitePoint Mentor bronze trophy
    ronpat's Avatar
    Join Date
    Jun 2012
    Location
    NJ, USA
    Posts
    2,534
    Mentioned
    62 Post(s)
    Tagged
    2 Thread(s)
    Works in IE8.

    My Win7 box is off, so someone else will have to test the modern IE.


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
  •