Home › Forums › WoodMart support forum › Set height and with for menu icon
Set height and with for menu icon
- This topic has 15 replies, 2 voices, and was last updated 4 years, 7 months ago by
Elise Noromit.
-
AuthorPosts
-
July 5, 2020 at 8:24 pm #208773
roadlinkParticipantHow can i set image size as 18px for these icons?
https://prnt.sc/tcci2qI guess i need to add custom css. I tried below code but didn’t work.
`.category-icon img {
height: 18px;
width: 18px;
}July 5, 2020 at 9:28 pm #208780
Elise NoromitMemberHello,
These are SVG icons.
You need to open your SVG icons file with some editor like Sublime Text or default system text editor and add width=”31″ height=”40″ attributes to your
<svg>
tag like it is shown: http://prntscr.com/m4n0qw
Then you will need to re-upload your icons in WordPress Dashboard.Best Regards
July 6, 2020 at 6:57 am #208830
roadlinkParticipantThanks for reply.
They are PNG for me. I have uploaded when i create categories.
https://prnt.sc/tcji9dWhat can i do for PNg files?
July 6, 2020 at 7:56 am #208855
Elise NoromitMemberHello,
Upload your PNG files and show me I will check is it possible to change the size with custom CSS. I think it would be possible.
Best Regards
July 6, 2020 at 10:55 am #208910
roadlinkParticipantHi,
Already uploaded files though Category Page.
https://prnt.sc/tco50zJuly 6, 2020 at 10:02 pm #209039
Elise NoromitMemberHello,
Please add this code to the Theme Settings > Custom CSS > Global:
body .vertical-navigation .item-level-0>a { height: 100px; } body .woodmart-navigation .category-icon { max-width:100% }
However, the image would remain the same https://prnt.sc/td0qfq cause the image size is too small, you need to upload bigger images.
Best Regards
July 6, 2020 at 11:13 pm #209069
roadlinkParticipantHello,
My aim was to set some size to images, but this code affects the line i guess?
Is that right?July 7, 2020 at 7:39 am #209123
Elise NoromitMemberHello,
The image is 18x18px and CSS cannot increase the image. You need to upload bigger images. When you upload bigger images, you will need to increase the height of the li item as this height would limit the height of the image.
Best Regards
July 7, 2020 at 1:39 pm #209205
roadlinkParticipantI know and want 18×18 images, since css was resizing it 18×18 already. I just upload direct sizes.
What i want is to set 18×18 in css so i can get rid of gtmetrix warning.
My customer want me to fix these warnings from gtmetrix.I want to able to set size something like this.
`.category-icon img {
height: 18px;
width: 18px;
}July 7, 2020 at 6:55 pm #209256
Elise NoromitMemberHello,
Here is the code:
body .woodmart-navigation .category-icon { max-width:18px; min-width:18px; }
Best Regards
July 8, 2020 at 10:45 pm #209551
roadlinkParticipantthank you but still have same warnings ๐
July 9, 2020 at 7:14 am #209602
Elise NoromitMemberHello,
Please try this code instead:
body .woodmart-navigation .category-icon { height:18px; width:18px; }
Best Regards
July 9, 2020 at 9:20 am #209649
roadlinkParticipantthank you, but it is exactly same code with previous message ๐
Have a nice day
July 9, 2020 at 10:52 am #209672
Elise NoromitMemberHello,
Sorry, I copied by mistake:
Take this one:
body .woodmart-navigation .category-icon { height:18px; width:18px; }
Best Regards
July 9, 2020 at 10:57 pm #209824
roadlinkParticipantI tried this one before by myself. Tried again but nothing changed.
July 10, 2020 at 9:56 am #209922
Elise NoromitMemberHello,
CSS code does not add width and height attributes to the
img
tag. Please try to upload SVG images. SVG images commonly used as icons. You can find a lot of free icons here: https://www.flaticon.com/Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register