Jump to content

Boxing only active tab in navigation

Recommended Posts

Site URL: https://blenny-daffodil-5dzg.squarespace.com/

Password : ProdigySite2021

Currently the nav works where the link you are currently on is coloured but additionally I want a box around only the currently selected tab.

I am running into more issues I need fixed such as the colour only being there when at the top of the page. And on certain laptops the text doesn't stay on one line. I was trying the buttons style for the nav but it made 3 rows of buttons for example. How do I ensure text stays on one line no matter the laptop (aside from mobile devices).

Link to comment
7 hours ago, hudson_lee02 said:

Site URL: https://blenny-daffodil-5dzg.squarespace.com/

Password : ProdigySite2021

Currently the nav works where the link you are currently on is coloured but additionally I want a box around only the currently selected tab.

I am running into more issues I need fixed such as the colour only being there when at the top of the page. And on certain laptops the text doesn't stay on one line. I was trying the buttons style for the nav but it made 3 rows of buttons for example. How do I ensure text stays on one line no matter the laptop (aside from mobile devices).

You mean like this

.Header-nav-item--active {
    color: #aadc14 !important;
    border: 1px solid #aadc14;
    box-sizing: border-box;
    padding: 0.1em !important;
}
.scrollNav .Header-nav-item--active {
  border-color: #000;
}

 

image.png

Edited by bangank36

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
18 hours ago, hudson_lee02 said:

Yes! Thank you so much it looks great!

Is there any way to keep the colour and box when you scroll down the page? Currently they are only there when at the top of a page.

It looks like you fixed this?

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 7/27/2021 at 9:49 PM, hudson_lee02 said:

The box stays but if possible I also want the colour to stay when you scroll down as well.

Use this code

header.Header .Header-nav .Header-nav-inner .Header-nav-item--active {
    color: #aadc14 !important;
    border: 1px solid #aadc14 !important;
    box-sizing: border-box;
    padding: .1em !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

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.