• skynet38

    (@skynet38)


    Hi!

    Any help would be appreciated as i am a noob! After reading all posts i couldnt find a solution.

    I have troubles to get the header fixed. I am only using the primary nav on top, and when i set site-header to fixed it will mess up everything (nav then sitting inside the header pic).

    Thanks Chris

Viewing 15 replies - 1 through 15 (of 18 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You want it fixed on any resolution too?

    Thread Starter skynet38

    (@skynet38)

    Hi

    Yes that would be great!

    The goal is that header and nav staying always on top

    Thanks 🙂

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Let’s see your site

    Thread Starter skynet38

    (@skynet38)

    I have removed the code from the css at the moment:

    http://www.rumpelpilz.org

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    When you say header, what specifically are you referring to?

    Thread Starter skynet38

    (@skynet38)

    The header image, i would like that the image above the navigation stays fixed there together with the Navigation..

    At the moment the header scrolls together with the navigation upwards and only the nav bar stays permanent.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    For both navigation and header to be fixed, you’ll need to wrap them into a <div>. Have you set up a child theme?

    Thread Starter skynet38

    (@skynet38)

    Yes i am using a child theme.

    How i have to do that?

    Thanks for your help!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Copy the ‘header.php’ file and put it into your Child Theme folder.

    Edit that header.php file from within your Child Theme and replace all of its code with the code from this Pastebin page: http://pastebin.com/Bf6vnzCJ

    Thread Starter skynet38

    (@skynet38)

    Thanks for that!

    I have modified now the css with header_wrapper/position fixed.

    But somehow it has a strange behaviour, the position of the header image changes as soon as i scroll down.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Looks like you also need some z-index in the header_wrapper too…

    About your strange behaviour issue – Isn’t it just because you still have the original fixed width styles you were trying to add?

    Thread Starter skynet38

    (@skynet38)

    The issue which i have now is that that the main content is behind the header and nav, adding a z index does not seem to help.

    What do you mean with trying to add width styles? So far i havent add any.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Try this CSS instead:

    .header_wrapper {
      position: fixed;
      top: 0;
      z-index: 10;
    }
    
    .masthead-fixed .site-header {
        position: static;
    }

    Thread Starter skynet38

    (@skynet38)

    Yes that looks better!

    Now the last issue is that the featured content grid is behind the header…

    i really your help, saved me a lot of research 🙂

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Oh that’s not so easy to do, isn’t that what you wanted though?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Need help with header!’ is closed to new replies.