Jump to content

Action on hover over category words

Recommended Posts

  • Replies 6
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

20 hours ago, tuanphan said:

Can you share your site url?

Its in the first post i made above your reply.

https://www.fab-medical.com

On 2/13/2021 at 1:23 PM, FABMedical said:

Site URL: https://www.fab-medical.com

Hi All i am attempting to replicate the underline effect that my menu bar has at the top of the website on the category names in the list on the sidebar of the shop page any help is much appreciated.,

 

https://www.fab-medical.com

 

 

Link to comment
On 2/15/2021 at 4:13 PM, FABMedical said:

Its in the first post i made above your reply.

https://www.fab-medical.com

 

Add to Design > Custom CSS

/* Shop link effect */
.category-link:after {
    content: '';
    background: #000;
    height: 2px;
    width: 0;
    display: block;
    margin-top: 2px !important;
    transition: width 1s;
    margin: 0 auto;
}
.category-link:hover:after {
    width: 100%;
}

 

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 2/16/2021 at 1:51 PM, tuanphan said:

Add to Design > Custom CSS


/* Shop link effect */
.category-link:after {
    content: '';
    background: #000;
    height: 2px;
    width: 0;
    display: block;
    margin-top: 2px !important;
    transition: width 1s;
    margin: 0 auto;
}
.category-link:hover:after {
    width: 100%;
}

 

Thanks i adapted it slightly as wasn't right inital result i managed to get something we are happy with by changing to 

/* Shop link effect */
.category-link:after {
    content: '';
    background: #000;
    height: 2px;
    width: 0;
    display: block;
    margin-top: 2px !important;
    transition: width 1s;
    margin: 1 auto;
}
.category-link:hover:after {
    width: 12%;
}

 

thanks again for the help

Link to comment
  • 1 year later...
On 1/26/2023 at 5:05 AM, jcny85 said:

Hey all. I have a few questions about this. Is there a way to have this effect only on the inactive links? Also, is there a way to restrict the length of the underline to the length of the link title? Thank you!

Can you share link to your site? We can adjust code easier

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.