Anco326 Posted January 5 Share Posted January 5 Hello, Would someone know the CSS code to contain the images in the Portfolio simple or Overlay? The default is object-fit : cover; I tried the following without any success, what am I missing =? #grid-image-inner-wrapper img { width: 100%; height: 100%; object-position: 50% 50%; object-fit: contain !important; } Thank you ! Link to comment
tuanphan Posted January 8 Share Posted January 8 "contain the image" - Can you explain this? And what is your site url? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Anco326 Posted January 10 Author Share Posted January 10 (edited) On 1/8/2023 at 6:57 PM, tuanphan said: "contain the image" - Can you explain this? And what is your site url? I want the images illustrating the logos to be contained in the containers. As of now the images are covering the container and is clipped. Thank you! Edited January 11 by Anco326 Link to comment
Solution beatrizc Posted January 10 Solution Share Posted January 10 Hey @Anco326! From what I can see, the grid-image-inner-wrapper is a class, not an ID. So, if you modify the selector slightly in your code and use a period instead of a pound sign, you should be set! .grid-image-inner-wrapper img { width: 100%; height: 100%; object-position: 50% 50%; object-fit: contain !important; } Hope that helps! Squarespace Customization Geek | Helping fellow designers code the heck out of Squarespace ☞ Get the free Squarespace Coding Essentials guide to reach that next level of customization you're aiming for. ☞ Check out all the plugins & mini-courses and masterclasses available to help speed up your projects. ☞ Looking to outsource a customization or fix? I'd love to help you out. Get in touch! Website | Youtube | Facebook | Pinterest Link to comment
Anco326 Posted January 11 Author Share Posted January 11 Thank you, that worked !! beatrizc 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment