is there a way to combine CSS2 Attribute Selectors like tr[id^="foo" AND id$="bar"]
, so it selects all <tr id="foo_something_bar">
but not <tr id="foo_something">
or <tr id="something_bar">
The descendant combinator — typically represented by a single space (" ") character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc.) element matching the first selector.
The CSS grouping selector is used to select multiple elements and style them together. This reduces the code and extra effort to declare common styles for each element. To group selectors, each selector is separated by a space.
To group selectors, separate each selector with a comma.
The same way you combine any selectors.
tr[id^="foo"][id$="bar"]
Those two substring matching selectors, however, are being introduced in the CSS 3 draft. They are not CSS 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With