Imagine a scenario where there is a navigation panel named <div class="nav">
containing 5 anchor links <a>
.
CSS:
.nav a:nth-of-type(1) {
text-decoration: underline;
}
The objective is to switch the underlined element by adjusting the CSS declaration as follows:
CSS:
.nav a:nth-of-type(2) {
text-decoration: underline;
}
Can this be achieved? (proof of concept)
UPDATE:
I am puzzled by the negative feedback. This is simply an exploration into whether altering the content before {} brackets -> change_this { stays_the_same }
could potentially be accomplished, perhaps with the aid of JavaScript.