Panneau N0C 04 EN 250 250
Get 15% discount on our partner PlanetHoster with the code PHA-ceikay

single image equal dimension

More
6 years 6 months ago - 6 years 6 months ago #56313 by Kleszewski
Code:
/*single images resize*/ .equalimage .innercontent, .equalimage .cktype, .equalimage .imageck, .equalimage .imageck img { height: 100%; } .equalimage .imageck img { object-fit: cover; width: 100%; }

"width: 100%;" It gives no change

I know this solution already exists in another add-on (image gallery). But sometimes the user needs to show individual images in several columns and they have different dimensions.

And here the problem arises, if he does not prepare them in a separate graphics program so that they have the same dimension, they will not be shown evenly on the page.
This message contains confidential information
Last edit: 6 years 6 months ago by Kleszewski.

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #56316 by ced1870
please try to also add a display:block;
Code:
.equalimage .imageck img { object-fit: cover; width: 100%; display:block; }

there is a strange issue in Firefox, as soon as I go in the debugger on the image tag, it automatically fits correctly, that is why I thought that it was working
Now tested also in Chrome, the display block fixes the issue

Joomlack Webmaster and Developer
The following user(s) said Thank You: Kleszewski

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #56320 by Kleszewski
Code:
display:block;
This is the value that was missing in the code
Now the images are shown perfectly as I wanted
Thank you very much for your help :)

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #56328 by ced1870
great that it works ! I will try to write a small tutorial on that, if anyone else need it :)

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
6 years 6 months ago #56333 by Kleszewski
A tutorial would be very useful showing how to deal with this problem quickly.
For my own needs, I have made a short guide on how to do it.
The following user(s) said Thank You: ced1870

Please Log in or Create an account to join the conversation.

Time to create page: 0.209 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1183 guests and one member online