• Resolved cullachie

    (@cullachie)


    We have been using Storefront for a few months now and are delighted with its page loading speeds and ease of use.
    I now want to align the site logo with the main navigation but my CSS skills are little better than elementary.
    I want the header on the pages to look like this https://snipboard.io/w95eKd.jpg



    It would be great if you can assist in modifying my CSS

    The existing CSS code I have on the site is as follows:-

    p {
    font-size: 1.125em; /* Equivalent to 18px */
    } .site-header-cart .cart-contents {
    font-weight: bold;
    } .woocommerce-page .price {
    display: none;
    } .storefront-breadcrumb {
    padding: 2.5em !important; /* Equivalent to 40px / margin: -2.5em !important; / Equivalent to -40px */
    } .single-product .storefront-breadcrumb {
    padding: 2.5em !important; /* Equivalent to 40px */
    margin: 0 !important;
    } @media screen and (min-width: 48em) {
    /* Equivalent to 768px */
    .woocommerce-active .site-header .site-branding img {
    max-width: 50%;
    } #masthead.site-header {
    padding-top: unset !important;
    }
    } .site-header {
    padding-top: 0.1875em; /* Equivalent to 3px */
    } masthead.site-header { padding-bottom: 0;
    } .site-branding {
    padding-top: 0.45em; /* Equivalent to 15px */
    margin-bottom: 0;
    } @font-face {
    font-family: 'icomoon';
    src: url("/wp-includes/fonts/icomoon.woff2") format('woff2'), url("/wp-includes/fonts/icomoon.woff") format('woff');
    font-weight: normal;
    font-style: normal;
    } .site-title,
    .site-description {
    display: none;
    } @font-face {
    font-family: 'roboto-v30-latin-regular';
    src: url("/wp-includes/fonts/roboto-v30-latin-regular.woff") format('woff');
    font-weight: normal;
    font-style: normal;
    } site-navigation-wrap .sub-menu li a { color: #FF0000 !important;
    } ul.sub-menu {
    background-color: #ABEA7C !important;
    } .sub-menu a {
    font-size: 0.9375em !important; /* Equivalent to 15px */
    font-weight: bold !important;
    } .main-navigation ul ul a:hover {
    background-color: #FFFF00 !important;
    color: #000000;
    } .main-navigation a {
    font-weight: bold;
    font-size: 1.0625em; /* Equivalent to 17px */
    } footer .site-info {
    display: none;
    } .site-search form {
    display: none;
    } masthead { position: fixed;
    top: 0;
    width: 100%;
    } page { padding-top: 7.3125em; /* Equivalent to 117px */
    } .footer-widgets {
    padding-top: 0;
    }

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @cullachie ,

    Thanks for reaching out!

    I understand that you would like to align your site logo with the main navigation, is this correct?

    You can try the adding the following CSS to Appearance → Customize and see if this helps you achieve your desired results:

    /* Adjust the logo and menu alignment */
    @media (min-width: 768px) {
      #masthead {
        padding: 41px 10% !important;
        display: flex;
        align-items: center;
      }
      
      #masthead > .col-full {
        float: none !important;
        flex: 1;
      }
      
      #masthead > .storefront-primary-navigation {
        clear: none !important;
      }
      
      .site-header .site-branding {
        display: flex;
        align-items: center;
      }
      
      .site-header .site-branding .custom-logo-link {
        margin-right: 10px; /* Adjust this value as needed */
      }
      
      .site-header .main-navigation {
        display: flex;
        align-items: center;
      }
      
      #page > .sticky-element-placeholder {
        height: 123px !important;
      }
    }
    

    If that doesn’t work on your end, you could have a look at the Storefront Powerpack extension which gives you the ability to customize and style nearly every aspect of Storefront without ever touching any code, including a drag-and-drop header builder to easily customize the header layout under Appearance → Customize.

    WooCommerce.com offers a 30-day refund policy which you can take advantage of, allowing you to test the extension, and make sure that it is what you are looking for.

    Cheers!

    Thread Starter cullachie

    (@cullachie)

    Many thanks!

    Hi @cullachie ,

    Happy to help!

    Since this has been resolved, feel free to create a new topic should you need any further help.

    Also, if you have a minute, we’d love it if you could leave us a review:?

    https://www.ads-software.com/support/theme/storefront/reviews/

    Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Align site logo Nav bar’ is closed to new replies.