Site logo

Archived topic

Featured image as background-size: cover in archieve posts

8 replies · Started by Manuel on March 12, 2018

Viewing posts 1–9 of 9

Hi Tom, hi Leo,

I want to show all featured images in the same size so the featured image fills the whole "featured image section" in archieve page (maybe background-size: cover?).
Here's an example from the Elementor Posts Widget:

SCREENSHOT EXAMPLE

Any chance to achieve this?

Best regards and thanks in advance,
Manuel

Hi Leo,

thanks for your reply.
The width is defenetly wide enough but it doesn't work for me. How can I crop the height without cropping the width?
GP-1

GP-2

And here's a LINK to my test site.

At the moment the featured image size in customizer is set to auto (default)

You can leave the width part blank (it would be auto) and just crop the height.

I've already tried but it doesn't work.

Here's another screenshot where I've set the height to 150px and the width to auto. The aspect ratio of the features image stays always the same.

Screenshot

What have I done wrong?

It works. Thanks a lot for figure it out for me.

No problem! :)

This archived topic is closed to new replies.