Jump to content

7.1 hover/active nav links

Go to solution Solved by tuanphan,

Recommended Posts

Posted (edited)

Hello! I have inserted some custom codes to remove the underline from links sitewide and added hover states to the main navigation tabs. 

Two questions:

1. What do I need to add/edit to make the active tab stick in that same dark blue #274061 for the main navigation menu as a way to indicate that you're currently on that page

2. How do I add hover states for all other links throughout the site, including the footer, and not just the main nav on the top?

Thanks in advance!

 

/* styling link underlines sitewide */ 
.sqs-block-html a {
  background-image:none!important;

.sqs-block-html h1 a, h2 a, h3 a, h4 a, p a {  
  border-bottom-style: none !important;  
  text-decoration-line: none !important; 
}


.footer a, a, p a{
  background: none !important;
  text-decoration-line: unset !important;
}

/* styling hover nav */
.header-nav a:hover{
color:#274061!important;}

 

Edited by creativenap
Posted
On 5/30/2023 at 2:16 AM, creativenap said:

Oh yes. Sorry... how did I forget that?!🙈 It's https://www.ksmith-architect.com/

Add to Design > Custom CSS

div.header-nav-item--active>a {
    color: #274061 !important;
}
footer.sections .html-block a:hover, .html-block a:hover {
    color: #274061 !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!)

Posted (edited)

Hi @tuanphan, this worked well. Thank you SO much! The only link (styled in Paragraph 3) that is still not working is the fine print at the bottom right "Nicole Wang Studio" Am I missing something? 

 

Edited by creativenap
  • Solution
Posted
On 6/7/2023 at 1:37 AM, creativenap said:

Hi @tuanphan, this worked well. Thank you SO much! The only link (styled in Paragraph 3) that is still not working is the fine print at the bottom right "Nicole Wang Studio" Am I missing something? 

 

Use this new code

div.header-nav-item--active>a {
    color: #274061 !important;
}
footer.sections .html-block a:hover, .html-block a:hover, .html-block a:hover span {
    color: #274061 !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!)

  • 1 year later...
Posted

Hi, I have a similiar question to creativenap. My site has custom CSS to allow the main nav and dropdown menu items to turn teal (#65BDB0) when hovering. What do I need to add to make these same items remain teal when active? It doesn't necessarily need to apply to the footer menu. The website is smc.church. Thanks for any help you can give!

Posted
On 8/9/2024 at 3:23 AM, SG75321407 said:

Hi, I have a similiar question to creativenap. My site has custom CSS to allow the main nav and dropdown menu items to turn teal (#65BDB0) when hovering. What do I need to add to make these same items remain teal when active? It doesn't necessarily need to apply to the footer menu. The website is smc.church. Thanks for any help you can give!

This is a bit manually.

Because items in Dropdown is Link item, so there is no short code to do this.

You will need to edit each page > Add code to make teal color

For example Mission & Beliefs

First, edit Mission & Beliefs Page > Add a Block (anywhere on page) > Choose Code Block > paste this code

<style>
  div.header-nav-folder-item [href="/beliefs"] {
    color: #65bdb0;
}
</style>

Similar with Meet the Team page, edit Meet the Team > Add a Code Block > paste this code

<style>
  div.header-nav-folder-item [href="/staff"] {
    color: #65bdb0;
}
</style>

 

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!)

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.