Syom Syom - 1 year ago 147
CSS Question

How to disable a HTML tag?

I want to disable a tag if it's already set -- e.g., disable a menu using

disabled = "true"
or something.

I can remove a tag completely using PHP; but I have already styled it and only want to disable it. Is it possible?

Answer Source

Nope, there is no CSS-only way known to me to disable a link the way you describe.

The only thing that comes to mind is putting an additional, transparent element in front of the link, but that can't be achieved in pure CSS, either.

How about giving it a href='#' onclick='return false' when generating them in PHP?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download