Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Custom CSS for all Hyperlinks Format upon Hover


joe_AT

Question

My question pertains to customizing hyperlinks on pages upon hover. Specifically, my linked text is desiged to transition from blue to red in a gradient format when hovered. It works for some pages, however on other pages the text is completely white and not visible (although you can still click the link). It also tends to not work with different design color backgrounds. 

Here is my code. My main question is: how do I get this design format to apply to all link text EXCEPT the text in the header (have a separate design for that). Is there something i am missing with the CSS code id's?

// HYPERLINKS ANIMATION & DESIGN

 .sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a {
  
  position: relative;
  display: inline;
  font-size: 1em;
  font-weight: 400;
  color: navy;
  overflow: hidden;}

 .sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a  {
  /* Same as before */
  background: linear-gradient(to right, red, red 50%, navy 50%);
}
.sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a   {
  /* Same as before */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  background-position: 100%;
}
.sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a  {
  /* Same as before */
  transition: background-position 400ms ease;
}

.sqs-block-html p a:hover, .sqs-block-markdown p a:hover, .collection-type-products.view-item p a:hover {
  background-position: 0 100%;
}

 

Thank you for any help :)

Link to comment
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
On 6/15/2020 at 9:56 PM, joe_AT said:

My question pertains to customizing hyperlinks on pages upon hover. Specifically, my linked text is desiged to transition from blue to red in a gradient format when hovered. It works for some pages, however on other pages the text is completely white and not visible (although you can still click the link). It also tends to not work with different design color backgrounds. 

Here is my code. My main question is: how do I get this design format to apply to all link text EXCEPT the text in the header (have a separate design for that). Is there something i am missing with the CSS code id's?

// HYPERLINKS ANIMATION & DESIGN

 .sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a {
  
  position: relative;
  display: inline;
  font-size: 1em;
  font-weight: 400;
  color: navy;
  overflow: hidden;}

 .sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a  {
  /* Same as before */
  background: linear-gradient(to right, red, red 50%, navy 50%);
}
.sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a   {
  /* Same as before */
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%;
  background-position: 100%;
}
.sqs-block-html p a, .sqs-block-markdown p a, .collection-type-products.view-item p a  {
  /* Same as before */
  transition: background-position 400ms ease;
}

.sqs-block-html p a:hover, .sqs-block-markdown p a:hover, .collection-type-products.view-item p a:hover {
  background-position: 0 100%;
}

 

Thank you for any help 🙂

Please post your site url so we can see the issue in action

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Portfolio hover Replace Link Style
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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...