Jump to content

Getting Navigation to stack vertically

Recommended Posts

Hi @AmalieCharlesworth Add to Design > Custom CSS

/* Stack navigation */
nav.header-nav-list {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 4/15/2021 at 2:32 AM, wagneric said:

Thanks for this code @tuanphan, I just added this to my site too.

I am trying to vertically stack the navigation on the left side, centered under the logo. Is this possible?

https://grasshopper-khaki-zhg3.squarespace.com

password:  bhco

Add to Design > Custom CSS

/* Header layout */
.header-title-nav-wrapper {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: start !important;
        -ms-flex-pack: start !important;
            justify-content: flex-start !important;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
}
.header-nav {
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    text-align: left !important;
}
.header-layout-nav-right .header-nav-item:not(:first-child):not(.header-actions-action--cart) {
    margin-left: 0 !important;
}

image.thumb.png.fbc181d5c719442ed69230616e7a0a9e.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 1 month later...
On 4/19/2021 at 11:25 AM, wagneric said:

@tuanphan  Thank you very much. I tried this, but the links are all displaying on the same line. Did I do something wrong?

 

Screen Shot 2021-04-18 at 8.21.27 PM.png

Hey how did you get it to look like that ?? 

Thank you!

Link to comment
On 4/19/2021 at 8:25 AM, wagneric said:

@tuanphan  Thank you very much. I tried this, but the links are all displaying on the same line. Did I do something wrong?

 

Screen Shot 2021-04-18 at 8.21.27 PM.png

Sorry, missing your comment. Do you still need help?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 4/19/2021 at 11:25 AM, wagneric said:

@tuanphan  I am still building my site but the the link is as follows.

https://clover-gardenia-s9l6.squarespace.com/config/

I put the same code that you gave above but the menus (portraits, corporate, etc) are all horizontal under the website title, I would like them to appear vertical, so it looks like this 

https://grasshopper-khaki-zhg3.squarespace.com/


The code I put in is as follows - however the menu items are still horizontal under the website name , not vertical.


/* Header layout */
.header-title-nav-wrapper {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: start !important;
        -ms-flex-pack: start !important;
            justify-content: flex-start !important;
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
}
.header-nav {
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    text-align: left !important;
}
.header-layout-nav-right .header-nav-item:not(:first-child):not(.header-actions-action--cart) {
    margin-left: 0 !important;

Thank you.

 

 

 

Link to comment
  • 1 year later...
18 hours ago, charlineca said:

Hi @tuanphan, I am trying to stack my navigation but is there any way to split the links between left and right side? I have 5 navigation links, I want to stack the first 3 on the left side and the last 2 on the right side of the logo. I have used the above code, but it only stacks on the left.

 

MY page is https://rabbit-orchid-h7nk.squarespace.com/, pw is squarespace.

Don't remove any code in your current code

Add to Design > Custom CSS

nav.header-nav-list>div:nth-child(n+4) {
    position: absolute;
    right: 0vw;
    bottom: 0;
}
nav.header-nav-list>div:nth-child(4) {
    bottom: 2vw;
}

image.thumb.png.617f71ac6dfc31988f07921bc42caee7.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
23 hours ago, charlineca said:

Thanks! They are however not aligned - the right side links are not in one line (our Story is a little more to the left) and also they are not aligned with the left links - should be aligned at top. Can you help with this? Thanks!

 

Also, do you mind just removing the screenshot?

Use this new code

nav.header-nav-list>div:nth-child(n+4) {
    position: absolute;
    right: 0;
    bottom: 0;
}
nav.header-nav-list>div:nth-child(4) {
    right: 0vw;
    top: 0;
}
nav.header-nav-list>div:nth-child(5) {
    right: 5px;
}

image.thumb.png.b39aadc40f688702c51e626ce06c1588.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.