0

Is it possible to make something like this?

[data-product-id="127"], [data-product-id="128"], [data-product-id="419"] > .product-inner-wrap > .price > em::after {
    color: red;
    font-size: 13px;
    content: " /100g."!important;
}

I have multiple product IDs in attributes and I need to change a few. I need to do this using only CSS.

  • “*Is it possible..?*” - yes. Will it work? That depends on what, specifically, you’re trying to do. What are you trying to select, what are you trying to “*change*”? Please read both the “*[mcve]*” and “*[ask]*” guidelines, then [edit] your question to add details about what you’re trying to do, what you’ve attempted, what went wrong in your attempts. – David Thomas Dec 15 '20 at 15:48
  • im trying to write "100g" after em in class .price, but only for few specific divs. I can only distinguish them using attribute data-product-id with assigned ids. Every div have same structure, so i thought that i can change all of them in "one line", not writing color, font-size and content every time for every div i want to edit. – Lero Dec 15 '20 at 15:57

0 Answers0