The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [How to?] Make text(link) active Reply To: [How to?] Make text(link) active


There are JS solutions that can set CSS states / classes automatically based on the html address of the page.

If you only have 4 pages then you can give the body of each page and ID / class and use that in your CSSto target their respective link.


If you main page is Home

You give the <body> a class of home

<body class="home">

in your HTML.

Then in the menu you give each link it’s own class too

<a href="home.html class="home">Home</a>

Then in your CSS you can target each link as you want.

body.home a.home,,,
body.donate a.donate  {
    your active styles;