Select multiple classes where a class attribute value begins with "xx"

Viewed 72

So I have a <div> which contains two classes <div class=vc_column-inner vc_custom_1583926619313>

I know how to select multiple classes with .class1.class2 and how to select a class attribute value that begins with "xx" div[class^="test"] My question is, is there a way to select them?

The thing is I want to select all classes with vc_column-inner and vc_custom_ but all of them have different ending numbers.

(I cannot change the classes because it's predifined by Wordpress)

1 Answers

Use a combination of class name and attribute contains selector like so:

div.vc_column-inner[class*="vc_custom_"] {
  /* your CSS here */
}
Related