Jump to content

How to style <a> everywhere EXCEPT <nav>


Kryptix

Recommended Posts

  Quote

As title really, I have <a>'s everywhere and I want to style them all EXCEPT for the <a>'s in <nav>

How would I leave them alone?

 

You can't. There are some pseudo selectors, but there isn't one that will exempt the <nav><a>s. You can only style the <a>s and the <nav><a>s, like this:

a {
    property: value;
}
nav a {
    property: value;
}

 

 

 

  • 3 weeks later...
  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.