Variable / Conditional CSS Selector

DIV[class^='mm-'] {}; //if an element class that needs to be selected STARTS in mm- DIV[class*='mm-'] {}; //if an element class that needs to be selected CONTAINS mm- DIV[class$='_mm'] {}; //if an element class that needs to be selected ENDS in _mm DIV[id^='mm-'] {}; //if an element ID that needs to be selected STARTS in mm- DIV[id*='mm-'] {}; //if an element ID that needs to be selected CONTAINS mm- DIV[id$='_mm'] {}; //if an element ID that needs to be selected ENDS in _mm
Provides ways of selecting elements based on some identifiable pattern in their class or ID.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.