Steve Bohler
asked on
CSS question related to hyperlinks
Is it possible to style a hyperlink so that:
a) The hyperlink can be made non-clickable.
or
b) The style specifies a URL to override the a href declaration.
Thanks,
Steve
a) The hyperlink can be made non-clickable.
or
b) The style specifies a URL to override the a href declaration.
Thanks,
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Begs the question if you can edit the HTML to add the class why not just remove the href ?
Yes, the acceptance of that as a solution makes no sense.
How does the acceptance of the solution make no sense? It answers the questions asked. Whether or not the implementation is appropriate is a different topic.
ASKER
I want to dynamically change the class of the a tag depending on certain factors. If a certain flag is set, I want the link to be inactive. No HTML editing.
I'm curious. If you're assigning a class to an element aren't you editing the HTML anyway? Or do you have some other way of setting the flag outside the HTML markup?
ASKER
The flag will be set via a query to a database.
Which implies the page is generated? In which case why generate the link in the first place?
b) No.
You could do something like that via javascript, or a back-end coding language (like ASP.Net).