Jump to content

Centering Navigation

Go to solution Solved by kaydotjpg,

Recommended Posts

Website: https://octagon-bugle-k97s.squarespace.com/

Password: 12345

 

Hi! I added the first code below, in red, to prevent the navigation links from stacking while centered. While the links aren't stacking anymore (yay!), they aren't center. I tried adding in a code below, in blue, to get them centered but it didn't seem to help. Any tips?

//center nav without stacking//
.header-nav-list {
    -ms-flex-wrap: nowrap !important;
        flex-wrap: nowrap !important;
}

//center nav links//

.header-layout-branding-center-nav-center .header-title-nav-wrapper {
    width: 100% !important;
    flex: 0 0 100% !important;
}
div.header-actions-action a.cart-style-icon {
    position: relative;
    right: 3vw;
}

 

 

Link to comment
  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

I figured it out by using this code: 

 

//center and unstack nav links//
@logoActionSize: 4.8%;  <--- adjust this

.header-layout-nav-center .header-display-desktop {
  .header-title-nav-wrapper {
    flex: 1 0 calc(~"100% - @{logoActionSize}");
  } 
  .header-actions {
    width: @logoActionSize;
  }
  .header-title {
    width: @logoActionSize;
    flex: 1 1 @logoActionSize;
  }
  .header-nav {
    width: calc(~"100% - @{logoActionSize} * 2");
    flex: 1 1 calc(~"100% - @{logoActionSize} * 2");
  }
}
 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.