[Resolved] site-wrapper before secondary navigation

Home Forums Support site-wrapper before secondary navigation

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1054694
    Martin

    Hi Folks,

    I need a svg background positioned behind secondary nav (before_header) and the header element.
    Due to the fact I want to position it pixel exact & responsive I would like to add it to the site-wrapper (which is already present but starting from before_header) and position it at the top.
    (Even better is an extra div that contains both elements but I don’t see this working because I also need the site-wrapper)

    Currently I see no hook before_secondary_navigation so I wonder how to go about.

    one more thing…..

    I have a space just above the top of my page (the sec. nav) about 26px. I just can’t find in the inspector where this is coming from. I now have to use a negative margin on body which I don’t like to do.

    thanks!

    #1054763
    David
    Staff
    Customer Support

    Hi there,

    the secondary nav when set to before header is hooked into the before_header hook. So you can add your element to the before_header hook and set the priority to a lower number eg. 1 will place it at the top.

    Regarding the space – it is because there is a white space " " being inserted immediately after the opening <body> tag. Which could be something in one of your hooks or being added by a plugin.

    #1056603
    Martin

    Thanks David. I wasn’t aware of the priority concept with hooks. great

    there was a typo (a dot) after the site-wrapper div in the hook that I overlooked at in the inspector.

    Love this support!

    #1056641
    David
    Staff
    Customer Support

    Awesome – glad to be of help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.