Jump to content

Changing Project Image Size for Single Project

Recommended Posts

Posted

Site URL: https://www.nickasbell.com

Hello! I am trying to change the last project image size "New Home Star" to a rectangle instead of a square through CSS with width & height and haven't been able to figure out the code to do so!

Screen Shot 2021-02-04 at 3.18.11 PM.png

photo.png

  • Replies 4
  • Views 921
  • Created
  • Last Reply
Posted
7 hours ago, tuanphan said:

Add to Design > Custom CSS


.tweak-portfolio-grid-overlay-image-aspect-ratio-11-square .portfolio-grid-overlay .grid-image, .grid-item {
    padding-bottom: 75% !important;
}

 

This changed the padding for all of the projects! Instead of just the New Home Star one! and when i hovered over it was still 1:1 square aspect ratio even though the image was rectangular!

Posted
On 2/6/2021 at 2:33 AM, tuanphan said:

Try new code


a.grid-item[href="/work/nhs"] .grid-image, a.grid-item[href="/work/nhs"] {
    padding-bottom: 75% !important;
}

the new code worked! however, the image doesn't show up with the new size - i tried a couple different methods but it did not work.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.