Dawn Theme: CSS for Blog Post Title Overlay on Featured Image Hover?

Dawn Theme: CSS for Blog Post Title Overlay on Featured Image Hover?

isacrisp
Visitor
2 0 2

Hi Shopify Community,

I'm using the Dawn theme and I'd like to customize how the blog post titles appear on my main blog page, which I'm using as a portfolio overview.

Currently, the featured image for each blog post is displayed in a grid, and the blog post title appears underneath the image.

I would like to change this so that the blog post title is initially hidden, and only appears (ideally as an overlay on top of the featured image, perhaps with a semi-transparent background) when someone hovers their mouse over the featured image.

Could anyone please help me with the custom CSS code to achieve this effect on the Dawn theme? I'm comfortable adding CSS to the "Custom CSS" section in the theme settings.

 

Any help or guidance would be greatly appreciated!

Replies 3 (3)

tim
Shopify Partner
4743 582 1711

Try this in "Custom CSS":

.card__content {
  position: absolute;
  bottom: 0;
  opacity: 0;
  transition: var(--duration-long) ease;
  background: rgba(255,255,255,0.6);
}

.article-card:hover .card__content {
  opacity: 1;
}
If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

devcoders
Shopify Partner
1596 189 488

Hello @isacrisp 

Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.

Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!

isacrisp
Visitor
2 0 2

UPDATE: I managed to achieve it without needing to add the CSS code, however thanks a lot for the responses!