Jump to content

Scaling overlay text on portfolio grid images

Recommended Posts

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

2 hours ago, lucyconochie said:

I have noticed that my overlay text on my portfolio project images does not scale to fit the image when viewed on smaller screens / platforms.

Is there a way to ensure the text is always contained within the constraints of the image it overlays?

 

Thank you

Can you share your URL so I can take a look?

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
2 hours ago, lucyconochie said:

Hi,

https://www.lucyconochiedesign.com/gardens

I want the text to respond to the size the image is, depending on what size screen / platform you're viewing it on.

Here is the Custom Css you can set to apply the size with 3 breakpoints

@media screen and (min-width: 1024px) {
  /*desktop view*/
  .portfolio-grid-overlay .portfolio-title {
    font-size: 24px;
  }
}

@media screen and (max-width:1023px) and (min-width: 768px) {
  /*Tablet view*/
  .portfolio-grid-overlay .portfolio-title {
    font-size: 22px;
  }
}
@media screen and (max-width: 767px) {
  /*Mobile view*/
  .portfolio-grid-overlay .portfolio-title {
    font-size: 10px;
  }
}

Support me by pressing 👍  or marking as solution if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date format)
💫 Animated Buttons (Referral URL)
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Hi, 

So I used the CSS 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, 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

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.