The following should do the trick:
div[class^='myclass'], div[class*=' myclass']{
color: #F00;
}
Edit: Added wildcard (*
) as suggested by David
More Related Contents:
- Flex-box: Align last row to grid
- Does the order of classes listed on an item affect the CSS?
- Specificity of inherited CSS properties
- CSS styling in Django forms
- CSS 3 slide-in from left transition
- Change color and appearance of drop down arrow
- Single huge .css file vs. multiple smaller specific .css files? [closed]
- Select all child elements recursively in CSS
- Why doesn’t the selector h3:nth-child(1):contains(‘a’) work?
- CSS to prevent child element from inheriting parent styles [duplicate]
- Stylesheet not updating when I refresh my site
- How to select label for=”XYZ” in CSS?
- How to use a unitless CSS variables and later add the needed unit?
- CSS Transform Skew [duplicate]
- Change outline for OutlinedInput with React material-ui
- Stacking order of elements affected by opacity
- Why is text getting blurry and wobbles during 2d scale transform
- How to make Twitter bootstrap modal full screen
- Two color borders
- Make text height 100% of div?
- Hide Up & Down Arrow Buttons (Spinner) in Input Number – Firefox 29
- How to apply child:hover but not parent:hover
- Align button at the bottom of div using CSS
- text flowing out of div
- Can I set the height of a div based on a percentage-based width? [duplicate]
- Is it bad practice to prefix single lines of CSS with // as a personal comment style?
- Issue when centering vertically with flexbox when heights are unknown
- Chrome & Safari Error::Not allowed to load local resource: file:///D:/CSS/Style.css
- Ellipsis in flexbox container [duplicate]
- CSS Double Border with outer border thicker than inner border