Home › Forums › Support › Add "object-fit" for featured images in custom css This topic has 5 replies, 3 voices, and was last updated 5 years, 7 months ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts September 14, 2018 at 3:08 am #676991 Leon I’m using square featured images and want to use object-fit for them. How do I create that? In custom css? Thanks, Leon September 14, 2018 at 9:15 am #677312 TomLead Developer Lead Developer Hi there, What are you trying to achieve with object-fit? Any examples? September 17, 2018 at 1:12 am #678967 Leon As you can see on http://l-seven.nl/wordpress/?page_id=12455 I’ve made all featured images square. I want the images to fill the square and crop if necessary and read that object-fit cover should do exactly that: https://css-tricks.com/almanac/properties/o/object-fit/ I tried to add that in custom css but it didn’t work. Hope you can help. Thanks, Leon September 17, 2018 at 3:53 am #679037 DavidStaff Customer Support Hi there, try this additional CSS: .post-image-aligned-center .post-image img { width: 110px; height: 110px; object-fit: cover; } September 17, 2018 at 3:59 am #679039 Leon That did it. Thank you very much for you fast reply. Leon September 17, 2018 at 4:04 am #679044 DavidStaff Customer Support You’re welcome. Glad we could help 🙂 Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In