/* To select all elemets that contain a class attribute you can use the * symbol. E.G. To select .this-is-a-class and .this-is-a-different-class you can do something like this: */ div[class*="is-a"] { background:#ffff00; }