Hey, I know, it’s a dumb question, espicially if you’ve built such a website, but I have problems or confusions with declaring an active link design for my submenu. The website is located here: http://doughboys.zxq.net/knuddels-cm/index.php. I only want to highlight the active link background with the same color as the hover background color; specificly I mean, whenever you click on the link, it takes you to the webpage, and the link should be highlighted, indicating that you’re located right here, at this link.
If your site is completely static, meaning that the same menu code appears independently on each page, you could just add a special class to the link on that page that styles it differently.
If your menu code is that same for all pages and fed in via a PHP include (meaning that you can edit it in just one place) you can add a different class to each link, and also add a class to the body element. So, for example, a Home link might have an id of #home one it. And the body tag on the tome page could have a class of .home. So then you’d style the link like so:
.home #home {background: ...}
So that style will only apply to the Home link when you are actually on the Home page. Etc…
Does that make sense?
I get the logic, thank you!