Customize products featured badges with css

This topic has 8 replies, 3 voices, and was last updated 1 weeks, 2 days ago ago by Andrew Mitchell

  • Avatar: Tiang
    Tiffany
    Participant
    November 12, 2024 at 13:28

    Hello, good afternoon, I am customizing the badges of my products, placing personalized images, I want to modify the featured badges, but I don’t know how to call the command. I am using this code for the badges of products on sale, and it works for me but now I want to do it with the featured products.

    .single-product .product .onsale{
    background-image: url(“https://woocommerce.divicon.net/wp-content/uploads/2020/09/oferta.png”) !important;
    font-size: 0;
    background-color: transparent !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    padding: 40px !important;
    }

    7 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 12, 2024 at 15:37

    Hello,

    We kindly request that you provide the URL of the page where the featured product badges are visible.

    Thank you for your assistance.

    Best regards,
    The 8Theme Team

    Avatar: Tiang
    Tiffany
    Participant
    November 12, 2024 at 16:38

    They are the products that have the logo (limited), I want to change it for an image, as I did with the products on offer like the code I placed previously

    Content is visible for topic creator and
    support staff only.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 12, 2024 at 16:59

    Hello, Tiffany,

    Please try to use this code:

    .products-loop .hot-label {
        background-image: url("image-url") !important;
        font-size: 0;
        background-color: transparent !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        padding: 40px !important;
    }

    Best regards,
    The 8Theme Team

    Avatar: Tiang
    Tiffany
    Participant
    November 13, 2024 at 12:27

    great, solved, thank you very much,

    I have a question regarding the size, is there the possibility within this same code to establish a different measurement of the image, in mobile and desktop versions?

    Because it happens to me that on the desktop it looks good in size but it is very big on mobile phones, and if I place the smaller badge image in the padding it looks good on mobile phones but very small on the desktop version.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 13, 2024 at 15:49

    Hello, Tiffany,

    You’re welcome!

    Please try to use this code in Theme Options > Theme custom CSS > Mobile:

    .products-loop .hot-label {
        padding: 20px !important;
    }

    Best regards,
    The 8Theme Team

    Avatar: Tiang
    Tiffany
    Participant
    November 14, 2024 at 10:46

    solved, thank you very much

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    November 14, 2024 at 10:46

    Dear Tiffany,

    We trust our theme is enhancing your experience. Taking a brief moment to rate it with a glowing 5 stars on ThemeForest would be immensely appreciated. Your feedback holds significant value for us.

    Click here to rate now: https://themeforest.net/downloads

    Thank you sincerely for your ongoing support!

    Best Regards,
    The 8Theme Team

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘customize products featured badges with css’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.