Jump to content

Targeting items within product summary blocks for text overlays

Recommended Posts

Site URL: https://www.tonywoodhair.co.uk/shop

Hi! I’m trying to target specific items within a product summary block so I can make custom text appear on rollover/hover (so, the text would be declared in the CSS, rather than inherited).

So far, I’ve got this:

Quote

 

.sqs-gallery-design-autogrid-slide .summary-thumbnail-container::after {
  content: '– Read More –';
  font-size: 20px;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 52px;
  box-sizing: border-box;
  text-align: center;
  opacity: 0;
  transition: opacity 0.42s;

}

.sqs-gallery-design-autogrid-slide:hover .summary-thumbnail-container::after
{
  opacity: 1;
}

 

This makes all items in summary blocks show the text ‘READ MORE’ on hover — now I’m trying to figure out how to target on a per-item basis, so I can change the text on each item. I can’t find the right mixture of CSS classes and HTML IDs!

Any help would be greatly appreciated. The page is here.

Thank you!

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Here code for SHAMPOOS, CONDITIONERS, AND TREATMENTS TO PREPARE YOU FOR A RESTYLE.

nth-child(1) = first item

div#block-yui_3_17_2_1_1587426612980_3755 .summary-item-list .summary-item:nth-child(1):after {
  content: '– Read More –';
  font-size: 20px;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.9);
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 52px;
  box-sizing: border-box;
  text-align: center;
  opacity: 0;
  transition: opacity 0.42s;
}
div#block-yui_3_17_2_1_1587426612980_3755 .summary-item-list .summary-item:nth-child(1):after
{
  opacity: 1;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.