Hello everyone;
I am currently facing a problem when uploading images on the homepage. When uploading any image to these sections on the homepage, the image gets big on these sections. How can I fix this issue?
store URL: https://skinociti.com
Section1 (Popular devices): https://snipboard.io/3C62wn.jpg
Section2 (Gadgets & accessories) :https://snipboard.io/b3EjFx.jpg
Hi,
You need to right click open inspect element. You will get to know css class, target it and use following code:
.example-class{
width: 350px !important;
}
Can you help me find the class from inspect? It would be much appreciated.
This link is not working https://snipboard.io/quYPXm.jpg
Can you please send updated link so that I can see and send you the relevant class?
Open
-
Themes -
-
Edit Code -
-
Find style.css or base.css and paste following code at the bottom of file:
.card-main .box:first-child {
width: 90px;
}
It worked indeed, thanks. However, I am still getting the problem on different screen size. Desktop/Mobile is fixed however, on this screen size. It hasn’t changed.
Please try following code then and let me know if it works:
.card-main .box:first-child img {
max-width: 90px !important;
}
I just noticed you are targeting the first image only. When uploading other image, the problem remains the same. I don’t think it is a proper solution.
Thank you for explaining.
So under popular devices section, first image of Macbook is larger than all other images. You need that first image should be same size as all the other images under popular devices? Is that so?
From the block editor, I am allowed to create as many popular devices I can. When creating any new popular device and upading any images of 170px height, it is working fine but exceeding the height after 170px. The image gets bigger. I want something that is going to maintain the height aspect ratio no matter what is the size of the image.
So for that I will need to login and adjust code.
Hello, @geekyboy . Try this solution:
- Open your theme
- Edit code
- Find the style.css file
- Add this css properties:
.popular-section .card-main .box img {
max-height: 170px;
}
I hope this solution will help you
.
Perfect, it worked. Can you also help me with this section as well?
This section is also on homepage when you scroll a bit.
the height section for this should be: 462px