is there any css rule that allows to select all containters including a certain string?

0

Issue

I would like to know whether is there a way in css to apply a rule to all containers including a certain string.
For example:
I have: class=”hello-english”, class=”goodbye-english” and class=”tomorrow-english”
Is there a way to select all classes containing the string “english” in the class name?
Thanks

Solution

Check out attribute selectors.

That’s basically, (or at least one answer to it)

element[class$="-english"] {
  ...insert rules here
}

Answered By – Franrey Saycon

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More