Thumbnail ratio 3:2
-
Hello there,
I'm trying to have all the project thumbnails image in the ratio 3:2 horizontal.
I'm not using thumbnail grid, but inserting them one by one in a page (is it convenient?)https://wip.landcho.eu/all-projects/
usr casetta
psw cibocineseIs there a way to make them all 3:2 and to crop for example vertical images centering them into the 3:2 frame?
I found this http://laythemeforum.com:4567/topic/5660/thumbnail-image-aspect-ratio/3?_=1752573772175 but not sure how to use it, I'm not getting the % things on padding-bottom...
Thank you,
Roberta
-
.col.type-project .ph{ padding-bottom: 66.6666666%!important; }
add this in:
lay options -> custom css & html -> custom css -
it worked on the frame, but still the image is not filling the frame as you see here
i tried to add this code
.thumb img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover !important;
background-position: center !important;
}and trying also with
.col.type-project .ph .img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover !important;
background-position: center !important;
}but nothing changes.
-
.col.type-project .ph{ padding-bottom: 66.6666666%!important; } .col.type-project .ph img{ position: absolute!important; top: 0!important; left: 0!important; width: 100%!important; height: 100%!important; object-fit: cover!important; }
try this please
-
it works! thanks
I also code custom websites or custom Lay features.
šæ Email me here: šæ
info@laytheme.com
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options ā Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it