Kunena Menu
single image equal dimension
- Kleszewski
-
Topic Author
- Offline
- Platinum Member
-
- I like playing chess.
Less
More
- Posts: 620
- Thank you received: 17
6 years 6 months ago - 6 years 6 months ago #56313
by Kleszewski
"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.
Replied by Kleszewski on topic single image equal dimension
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.
6 years 6 months ago #56316
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic single image equal dimension
please try to also add a 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
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.
- Kleszewski
-
Topic Author
- Offline
- Platinum Member
-
- I like playing chess.
Less
More
- Posts: 620
- Thank you received: 17
6 years 6 months ago #56320
by Kleszewski
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
Replied by Kleszewski on topic single image equal dimension
Code:
display:block;
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.
6 years 6 months ago #56328
by ced1870
Joomlack Webmaster and Developer
Replied by ced1870 on topic single image equal dimension
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.
- Kleszewski
-
Topic Author
- Offline
- Platinum Member
-
- I like playing chess.
Less
More
- Posts: 620
- Thank you received: 17
6 years 6 months ago #56333
by Kleszewski
Replied by Kleszewski on topic single image equal dimension
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.
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




