Dan Dan - 2 years ago 80
CSS Question

What css pseudo class should I use, to capture classes with a specific naming pattern?

For instance, is it possible to use one selector for the following classes

.bikes-panel, .cars-panel, .trucks-panel

such that you have a selector that looks like

.?????panel{ css code goes here}

Answer Source

*[class$="-panel"] will do what you're looking for, however only if the .???-panel is the last class named in the class attribute.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download