Home › Forums › CSS › [How to?] Make text(link) active › Reply To: [How to?] Make text(link) active
September 14, 2013 at 5:24 am
#150055
Paulie_D
Member
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.
Example.
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.gallery a.gallery,
body.contact a.contact,
body.donate a.donate {
your active styles;
}