Featured image background-size
-
Hi,
I have a Masonry layout:
http://artmediastock.com/wp-content/uploads/feat-img.png
Using Nelio, items have fixed size (see first 3 items):
http://artmediastock.com/wp-content/uploads/nelio-img.png
Modifying css of the item from “background-size: cover;” to “background-size: contain;” and “img.nelioefi {width:100%;height:auto;}”, I got this:
http://artmediastock.com/wp-content/uploads/nelio-img-css.png
Please note the space above and below the image. How to make the container fit the image keeping the aspect ratio?
Thank you and best regards,
Gabriel
The topic ‘Featured image background-size’ is closed to new replies.