Jump to content

Scaling overlay text on portfolio grid images

Recommended Posts

Hi, 

So I used the CSS given to me the first time I asked this Q and changed the mobile view option to 20px (10 was too tiny).

But I'm still having the issue that when the size of the project thumbnails is reduced due to screen size or the platform it's viewed on, the text doesn't reduce with it to stay within the image.  I get these scroll tabs when the title is longer.  I've attached a screenshot.

Screenshot 2023-01-18 at 16.14.39.png

Link to comment

Try this replacement CSS:

@media screen and (max-width: 1400px) and (min-width: 768px) {
  #collection-60918b0fccbc0b415d2e579f {
    .portfolio-grid-overlay .portfolio-title {
      font-size: 1.6vw;
      overflow: hidden;
    }
  }
}

It covers 1400px to 768px, and uses a font size that directly scales with the viewport width (vw instead of px).

Let me know how that works for you.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.