[Resolved] How to get the page-header element to appear half way up the logo/nav

Home Forums Support [Resolved] How to get the page-header element to appear half way up the logo/nav

Home Forums Support How to get the page-header element to appear half way up the logo/nav

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1590786
    unoaime

    I’m using the “Service” theme. On the homepage i was able to do it by using the spacing feature and doing “margin-top: 100px”. On the other pages though it seems a lot more complicated to get the correct styling due to the page-header element.

    I could probably create an individual hero for each page but it would become tedious doing it for every new one so would somehow like it to work in the element.

    I fiddled around earlier and managed to get it placed right but it would appear on top of the logo and navigation, obscuring them.

    Any ideas?

    #1590868
    unoaime

    I’ve just edited to include the website url. What I have on the homepage I’d like to be consistent throughout but having some real trouble getting the page header element to behave how i’d like.

    #1590874
    David
    Staff
    Customer Support

    Hi there,

    your site is behind a coming soon page – can you share a login so we can take a look?

    #1590908
    unoaime

    Oh whoops! Details added. Thanks.

    #1591099
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    How exactly would this work with the existing Page Hero heading/text? Do you have a quick mockup of the look you’re going for?

    #1591121
    unoaime

    Right now the global page header is merged with the header/nav, but i would like it to start around half way down, so just above the “TRAINING” word. This is so it remains consistant with the styling on the front page.

    Is this a better desciption?

    If not i’ll go ahead and try to make a mockup. Thanks for the reply.

    #1591653
    David
    Staff
    Customer Support

    Try adding this CSS:

    body:not(.home) .header-wrap {
        top: 30px;
    }
    
    body:not(.home) .page-hero {
        margin-top: 100px;
    }
    #1591720
    unoaime

    Fantastic! It all seems so simple when you know how! I was not aware of not(.home). I’ll be remembering this and definitely using it on future sites.

    Thank you so much, and Merry Christmas!

    #1591724
    unoaime

    #1591752
    David
    Staff
    Customer Support

    You’re welcome.

    :not is a CSS pseudo selector. It simply allows you to exclude elements that have a specific class.

    More info here:

    https://developer.mozilla.org/en-US/docs/Web/CSS/:not

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