Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: incrediBILL
I'm working on a dynamic menu (created with PHP) and using CSS to define the styles, but there's a question that may probably be pure HTML, suited to this forum.
I'm making my menu such that the menu link for the current displayed page is to become inactive, so that users don't waste bandwidth accidentally reloading the same page. I would like the link to appear in a different colour also to indicate clearly that this is the menu item being displayed in the content area of the page.
What is the best way to define the menu item? One way is to change the link from:
<a href="thispage.html">This Menu Item</a>
<a class="red_highlighted" >This Menu Item</a>
Because removing the href attribute renders the link inactive, and I can define a CSS class to give a different colour, hover, etc.
The other way is simply to change the link to something else:
Is there a prefered solution? Is there a solution which allows the menu item to look more like a link - in so far as the mouse pointer will still change to the hand icon when hovering over the inactive link? If I use either of the two methods above, the mouse icon does not change to the hand when over the inactivated link/h1. So, can one create a link with the appropriate mouse hover icon but with no link activity?
You should choose names based on what it does, not what it looks like!
If you wanted that "link" in green next week, then the code saying class="red" is just going to be confusing.
Change it to something like class="linkdisabled" or something.