Anco326 Posted January 5, 2023 Posted January 5, 2023 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 !
tuanphan Posted January 8, 2023 Posted January 8, 2023 "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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Anco326 Posted January 10, 2023 Author Posted January 10, 2023 (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, 2023 by Anco326
Solution beatrizc Posted January 10, 2023 Solution Posted January 10, 2023 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 Coding Expert | Coding the heck out of Squarespace, one wtf at a time. ☞ Search through The Codebase to learn new CSS tricks and awesome customizations. ☞ Get +150 mini-plugins ready to copy-paste to fix or tweak your Squarespace site. ☞ Got a rare, medium rare or fully cooked idea for your client's project? Let's make it a reality. Website | Youtube
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment