Jump to content

How to change CSS to affect #colour on one section

Recommended Posts

I've injected this CSS to create animated hover over effect on hyperlinks, but it's applying uniformly across site. This means the hover effect is #000000 even if on a dark background, making it illegible.  Is there a way to create an override for darker pages, to that it shows as #FFFFFF?

 

// Fade Out Line Hyperlink - Middle Stretch Out //
p a{
  display: inline-block;
  style: none !important; 
}

p a:hover:after{
  transform: scaleX(1) !important;
}

p a:after {
  display:block;
  content: '';
  border-bottom: solid 2px #000000 !important; 

p a:after {
  transform: scaleX(0);  
  transition: transform 250ms ease-in-out;
  z-index: 999 !important;
 }

 

Site link: https://mandarin-circle-ndlm.squarespace.com/home

Password: 20tyde21!

Thanks

M

Screenshot 2021-06-14 at 15.32.52.png

Screenshot 2021-06-14 at 15.32.58.png

Link to comment
  • Replies 5
  • Views 621
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for this. That code works/changes on light background. It's the dark background that I need changing though. Do you know how 'Darkest 1' background option is referred to as in CSS? I've tried changing "light" to "darkest" and "darkest 1" but neither are working...?

Link to comment
On 6/17/2021 at 3:59 PM, MarcUK1603 said:

That's done it worked - brilliant. Thanks for help. Out of curiosity, why hasn't SS applied a current data style? It has for "light" but you're right, having inspected the theme for "dark" there's nothing set/showing? Weird. 

Not sure. Do you want fix these?

Site URL: https://mandarin-circle-ndlm.squarespace.com/home

1. (Tablet-Homepage) resize text?

mandarin-circle-ndlm.squarespace.com-01-

2. (Tablet-Homepage) Make 2 items/row + reduce text size?

mandarin-circle-ndlm.squarespace.com-02-

3. (Mobile-Homepage) Make buttons side by side?

mandarin-circle-ndlm.squarespace.com-03-

4. (Mobile-Header) Click burger, nothing appear

mandarin-circle-ndlm.squarespace.com-04-

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.