single image equal dimension

  • Kleszewski
  • Kleszewski's Avatar Offline Topic Author
  • Platinum Member
  • Platinum Member
  • I like playing chess.
  • Posts: 529
  • Thanks: 16

Replied by Kleszewski on topic single image equal dimension

Posted 3 years 11 months ago #56313
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:3 years 11 months ago by Kleszewski
Last edit: 3 years 11 months ago by Kleszewski.

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

Replied by ced1870 on topic single image equal dimension

Posted 3 years 11 months ago #56316
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

by ced1870
The following user(s) said Thank You: Kleszewski

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

  • Kleszewski
  • Kleszewski's Avatar Offline Topic Author
  • Platinum Member
  • Platinum Member
  • I like playing chess.
  • Posts: 529
  • Thanks: 16

Replied by Kleszewski on topic single image equal dimension

Posted 3 years 11 months ago #56320
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.

Replied by ced1870 on topic single image equal dimension

Posted 3 years 11 months ago #56328
great that it works ! I will try to write a small tutorial on that, if anyone else need it :)

Joomlack Webmaster and Developer

by ced1870

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

  • Kleszewski
  • Kleszewski's Avatar Offline Topic Author
  • Platinum Member
  • Platinum Member
  • I like playing chess.
  • Posts: 529
  • Thanks: 16

Replied by Kleszewski on topic single image equal dimension

Posted 3 years 11 months ago #56333
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.643 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 1093 guests and no members online