Jump to content

Adding Boxes/Borders to Navigation/Header Elements

Recommended Posts

On 5/2/2022 at 7:51 PM, RDC said:

Hey @tuanphan

Yes please! And was hoping to create the different colour hover effect if possible?

Thanks so much!

Add to Design > Custom CSS

/* Fullwidth navigation border*/
.header-announcement-bar-wrapper {
    padding-left: 0px !important;
    padding-right: 0px !important;
}
.header-display-desktop {
    flex-direction: column;
}
.header-title-nav-wrapper {
    flex: 0 0 100% !important;
    margin-right: auto;
    width: 100% !important;
}
nav.header-nav-list {
    display: flex;
    width: 100%;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}
.header-nav-item a {
    line-height: initial;
    padding-top: 10px !important;
    padding-bottom: 10px !Important;
}
.header-nav-item {
    border-left: 1px solid white;
    border-right: 1px solid white;
    margin: 0 !important;
    padding-left: 1vw;
    padding-right: 1vw;
    margin-left: -1px !important;
}

 

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
  • 5 weeks later...
On 5/5/2022 at 11:03 AM, tuanphan said:

Add to Design > Custom CSS

/* Fullwidth navigation border*/
.header-announcement-bar-wrapper {
    padding-left: 0px !important;
    padding-right: 0px !important;
}
.header-display-desktop {
    flex-direction: column;
}
.header-title-nav-wrapper {
    flex: 0 0 100% !important;
    margin-right: auto;
    width: 100% !important;
}
nav.header-nav-list {
    display: flex;
    width: 100%;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}
.header-nav-item a {
    line-height: initial;
    padding-top: 10px !important;
    padding-bottom: 10px !Important;
}
.header-nav-item {
    border-left: 1px solid white;
    border-right: 1px solid white;
    margin: 0 !important;
    padding-left: 1vw;
    padding-right: 1vw;
    margin-left: -1px !important;
}

 

How do I get the menu items covering the whole row, so there is no empty columns on the side?

Link to comment
7 hours ago, meltmelt said:

Don't remove any code in your current code

Add this to Design > Custom CSS
 

nav.header-nav-list {
    justify-content: space-between !important;
}

 

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 8/10/2022 at 2:10 PM, annicatter16 said:

Hi is there a way to remove the spacing? I used this code but there is space between the items.

https://grouper-hypersphere-mkrw.squarespace.com/

password:12345

Remove these yellow?

image.thumb.png.401f1540b4c092ff4ba84d822fef9649.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
On 8/12/2022 at 2:05 PM, annicatter16 said:

yes please

First, change this code

nav.header-nav-list {
    justify-content: space-between !important;
}

to this

nav.header-nav-list {
    justify-content: center !important;
}

 

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 8/18/2022 at 2:40 PM, annicatter16 said:

Thanks I have changed url to: https://calliope-primrose-s254.squarespace.com/

password:12345

it works but there is weird line on the first box and the cart is in the middle. It also looks weird on mobile. Any fixes? Thankyou

The site is private now.

You mean underline on first item?

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 8/22/2022 at 4:35 AM, annicatter16 said:

Not private now. Yes the line on first item- but mainly the shopping cart and the problems with the header appears on mobile is the problem

Add to Design > Custom CSS

div.header-nav-item--active a {
    background-image: none !important;
}

Can you describe in detail problem on mobile header?

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
  • 10 months later...

hi @tuanphan, i've followed this thread with code until the end, and my code is almost exactly the same (overall width and line thickness adjusted, see below). the only problem is the navigation is not appearing as a dropdown option/hamburger or anywhere in the mobile, how can i resolve that, please? thanks!

 

/* Fullwidth navigation border*/
.header-announcement-bar-wrapper {
    padding-left: 0px !important;
    padding-right: 0px !important;
}
.header-display-desktop {
    flex-direction: column;
}
.header-title-nav-wrapper {
    flex: 0 0 100% !important;
    margin-right: auto;
    width: 100% !important;
}
nav.header-nav-list {
    display: flex;
    width: 100%;
    border-top: 2px solid black;
    border-bottom: 2px solid black;
}
.header-nav-item a {
    line-height: initial;
    padding-top: 10px !important;
    padding-bottom: 10px !Important;
}
.header-nav-item {
    border-left: 1px solid black;
    border-right: 1px solid black;
    margin: 0 !important;
    padding-left: 1vw;
    padding-right: 1vw;
    margin-left: -1px !important;
    margin-right: -1px !important;
}

nav.header-nav-list {
    justify-content: center !important;
    flex-wrap: nowrap;
}
nav.header-nav-list>div {
    width: 30%;
}

Link to comment
  • 5 weeks later...

Hi,

Thank you so much for this helpful code! I am also having an issue with the mobile menu not being visible after I install this CSS. My site isn't live yet. How can I enable you to see it?

Here is the code I used (which caused the mobile menu to disappear):

/* Fullwidth navigation border*/
.header-announcement-bar-wrapper {
    padding-left: 50px !important;
    padding-right: 0px !important;
}
.header-display-desktop {
    flex-direction: column;
}
.header-title-nav-wrapper {
    flex: 0 0 100% !important;
    margin-right: auto;
    width: 100% !important;
}
nav.header-nav-list {
    display: flex;
    width: 100%;
  background-color: #6f889f;
}
.header-nav-item a {
    line-height: initial;
    padding-top: 10px !important;
    padding-bottom: 10px !Important;
}
.header-nav-item {
     border-left: none;
    border-right: 1px solid white;
  margin: 0 !important;
    padding-left: 2vw;
    padding-right: 1.5vw;
    margin-left: 1px !important;
}
body:not(.header--menu-open) [data-header-style="solid"].header .header-nav-wrapper a {
  color: #ffffff;
}
body:not(.header--menu-open) [data-header-style="solid"].header .header-nav-wrapper a:hover {
  color: #333333;
}
body:not(.header--menu-open) [data-header-style="solid"].header .header-nav-wrapper .header-nav-item--active a {
  color: #333333;
}
nav.header-nav-list {
    justify-content: space-between !important;
}
nav.header-nav-list {
    justify-content: left !important;
    flex-wrap: nowrap;
}

 

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.