Jump to content

rollover titles

Recommended Posts

  • Replies 6
  • Views 706
  • Created
  • Last Reply

Top Posters In This Topic

On 8/28/2021 at 2:26 AM, dguralnick said:

Site URL: https://www.studiodistill.com/case-studies

hi! I would like to add a rollover to the images on this page of my site: https://www.studiodistill.com/case-studies

I want the images to have a colored filter over them, and the title of that particular project centered in the image area, in white. is this possible?

I'm using foster template on 7.0.

Hi,

I don't see title. Can you add some title? We can test 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
On 8/31/2021 at 7:32 AM, dguralnick said:

sorry. I just added the names as captions below.

Add to Design > Custom CSS

/* Image blocks hover effect */
body#collection-6105ed9ad33ada673d341a5b {
figure {
    position: relative;
}
figcaption.image-caption-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    padding: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: all 0.3s;
	color: white;
}
.sqs-block-image-link:after {
    position: absolute;
    content: "";
    background-color: rgba(0,0,0,0.5);
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s;
    opacity: 0;
}
.image-block>div:hover .sqs-block-image-link:after, .image-block>div:hover figcaption.image-caption-wrapper {
    opacity: 1;
}}

 

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 9/1/2021 at 11:14 PM, dguralnick said:

that works awesome! thank you so much!

now how do I make the type bigger and all caps?

Use new code

/* Image blocks hover effect */
body#collection-6105ed9ad33ada673d341a5b {
figure {
    position: relative;
}
figcaption.image-caption-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    z-index: 9999;
    padding: 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transition: all 0.3s;
	color: white;
}
.sqs-block-image-link:after {
    position: absolute;
    content: "";
    background-color: rgba(0,0,0,0.5);
    display: block;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.3s;
    opacity: 0;
}
.image-block>div:hover .sqs-block-image-link:after, .image-block>div:hover figcaption.image-caption-wrapper {
    opacity: 1;
}
figcaption.image-caption-wrapper * {
    font-size: 20px !important;
    text-transform: uppercase;
}
}

 

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.