[Resolved] Alternate mobil menu with svg or png file

Home Forums Support Alternate mobil menu with svg or png file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1193964
    Horst

    Hi there,

    I would like to exchange the currently used icon for an SVG, alternatively PNG icon in the mobile menu. Can this be done with CSS, but should it work with a PNG file? Unfortunately, I can’t reach my goal.
    Thanks in advance.
    Regards, Horst

    .slideout-toggle:not(.has-svg-icon) a:before {
    content: “\f228”!important; color: #444!important;
    font-family: “Dashicons”!important;
    position: relative;
    box-sizing: content-box;
    width: 35px;
    height: 35px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 35px;
    line-height: 1;
    cursor: pointer;
    top:12px!important;
    }

    #1194296
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You should be able to use a PNG like this:

    .slideout-toggle:not(.has-svg-icon) a:before {
        content: url( 'URL TO PNG HERE' );
    }

    Let me know 🙂

    #1194448
    Horst

    Thank you very much, Tom. It worked just fine. I had tried this solution myself. It did not work, probably because the cache could not be emptied properly. New version of WP Rocket (with CDN). 🙂

    Thanks and regards, Horst

    P.S .:! Important was necessary

    #1194788
    Tom
    Lead Developer
    Lead Developer
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.