Select element using its ID without the high specificity of the ID selector

suggest change

This trick helps you select an element using the ID as a value for an attribute selector to avoid the high specificity of the ID selector.

HTML:

<div id="element">...</div>

CSS

#element { ... } /* High specificity will override many selectors */

[id="element"] { ... } /* Low specificity, can be overridden easily */

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents