You are on page 1of 1

When the High Specificity of id Selectors is Useful

In some circumstances, you might want the higher specificity of an id selector.


For example, a network of media sites might wish to use the same navigation bar
across all of its web properties. This component must be consistent across sites
in the network, and should be hard to restyle. Using an id selector reduces the
chances of those styles being accidentally overridden.

You might also like