How can I add an image to a subcategory and sizing that image?

Hello,

I did changed ::before CSS codes
background: none and I added background-image: url (…)
But when I resize it, it doesn’t work the way I want.

Like width : 60px and height : 60px or max-width : 60px

Where am I making a mistake?

1 Like

I did :slight_smile:

.badge-category__wrapper .badge-category:before {
    background: none;
    border-radius: 2px;
    margin-top: 4px;
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    background-image: url(IMG URL);
    background-size: 15px 15px;
    margin-right: .5em;
}

.badge-category__wrapper .badge-category.--has-parent:before {
    background: none;
    border-radius: 2px;
    margin-top: 4px;
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    background-image: url(IMG URL);
    background-size: 15px 15px;
    margin-right: .5em;
}
1 Like