Home Forums WoodMart support forum Set height and with for menu icon

Set height and with for menu icon

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #208773

    roadlink
    Participant

    How can i set image size as 18px for these icons?
    https://prnt.sc/tcci2q

    I guess i need to add custom css. I tried below code but didn’t work.

    `.category-icon img {
    height: 18px;
    width: 18px;
    }

    #208780

    Hello,

    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

    #208830

    roadlink
    Participant

    Thanks for reply.
    They are PNG for me. I have uploaded when i create categories.
    https://prnt.sc/tcji9d

    What can i do for PNg files?

    #208855

    Hello,

    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

    #208910

    roadlink
    Participant

    Hi,

    Already uploaded files though Category Page.
    https://prnt.sc/tco50z

    #209039

    Hello,

    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

    #209069

    roadlink
    Participant

    Hello,
    My aim was to set some size to images, but this code affects the line i guess?
    Is that right?

    #209123

    Hello,

    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

    #209205

    roadlink
    Participant

    I 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;
    }

    #209256

    Hello,

    Here is the code:

    body .woodmart-navigation .category-icon {
        max-width:18px;
        min-width:18px;
    }

    Best Regards

    #209551

    roadlink
    Participant

    thank you but still have same warnings 🙁

    #209602

    Hello,

    Please try this code instead:

    body .woodmart-navigation .category-icon {
        height:18px;
        width:18px;
    }

    Best Regards

    #209649

    roadlink
    Participant

    thank you, but it is exactly same code with previous message 🙂

    Have a nice day

    #209672

    Hello,

    Sorry, I copied by mistake:

    Take this one:

    body .woodmart-navigation .category-icon {
        height:18px;
        width:18px;
    }

    Best Regards

    #209824

    roadlink
    Participant

    I tried this one before by myself. Tried again but nothing changed.

    #209922

    Hello,

    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

Viewing 16 posts - 1 through 16 (of 16 total)