How to change the background color of the Delete Icon?

Support MB Favorite Posts How to change the background color of the Delete Icon?Resolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #44064
    PhilippPhilipp
    Participant

    Hi there,

    I want to change the background color of the delete icon.

    When I do it like this, the whole button including the icon is black:

    .mbfp-posts .mbfp-table__delete {
    background: #00000 url(trash.svg) no-repeat center;
    }

    I want the trash.svg icon to stay white.

    How to do that?

    #44069
    PeterPeter
    Moderator

    Hello,

    Because you don't have the file trash.svg in the same directory of the file that you add the CSS code. You can add the absolute URL of the icon file to the CSS code to change the background color of the delete button, like this:

    .mbfp-posts .mbfp-table__delete {
     background: #000000 url(https://yoursite.com/wp-content/plugins/mb-favorite-posts/assets/trash.svg) no-repeat center;
    }
    #44075
    PhilippPhilipp
    Participant

    Hello Peter,

    thank you this works! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.