[Support request] Oddness when I align primary nav

Home Forums Support [Support request] Oddness when I align primary nav

Home Forums Support Oddness when I align primary nav

  • This topic has 11 replies, 3 voices, and was last updated 5 years ago by David.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #867623
    Leif

    In this image you can see that when I align my primary nav ‘float right’ of my header it isn’t vertically centered vs the site logo image and it has these horizontal bars that come with it?

    How do I vertically center it and get rid of the bars?

    #867814
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media (min-width: 768px) {
        .inside-header {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
                -ms-flex-align: center;
                    align-items: center;
        }
        .site-logo {
            margin-right: auto;
        }
    }
    #868017
    Leif

    OK neat thanks David. Its centered now but is there also a way to get rid of the lines around the primary navigation?

    See image

    #868070
    Leo
    Staff
    Customer Support

    Remove this CSS from Additional CSS in the customizer:

    /* navigation top and bottom rules */
    #site-navigation {
    	border-top:  solid 1px rgba(136,136,136,0.5);
    	border-bottom: solid 1px rgba(136,136,136,0.5);
    }
    #868888
    Leif

    Right on thanks!
    But now I realize I need the equivalent rule on top of my hero image ๐Ÿ™ since the rule isnt coming from the navigation anymore (and I’m moving the navigation)

    Sorry this was more complicated than I planned. T_T

    #868920
    Leo
    Staff
    Customer Support

    Can you link me to the page in question?

    #868968
    Leif

    Sure its this page (im testing out an updated home page here)

    the primary nav is under the header here because I dont know how to change it for just this trial page.
    but there are rules above and below it which i will remove when I float the primary nav to the right of the site logo. So I want to put a rule on the top of the hero image once I move the nav.

    #868980
    Leo
    Staff
    Customer Support

    You should be able to do this:

    .page-hero {
        border-top: solid 1px rgba(136,136,136,0.5);
    }
    #871355
    Leif

    Oh nice it works but I realized there is a problem
    Not all of my pages have the hero image but when I move my primary navigation I will lose the rule it gives at the bottom of my header.

    How would I put the same rule at the bottom of the header? I assume its like this but I cant figure out how to address the header ๐Ÿ™

    .header {
        border-bottom: solid 1px rgba(136,136,136,0.5);
    }
    #871669
    David
    Staff
    Customer Support

    Hi there,

    you already have borders on the top and bottom of the primary nav? So i am unsure as to what is missing when you visit a page without a Header Element

    #871688
    Leif

    Sorry I plan to move the primary nav to float right of the logo, thus causing me to lose my borders, but I don’t want to move it until I can figure out how to put the rules in.

    #871712
    David
    Staff
    Customer Support

    Aah ok. You would need to use the .site-header selector in your CSS

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