I have two links inside a button but the links don't seem to work on Firefox.
<button class="btn login">
<a href="/login"><b>Log In</b></a>
|
<a href="/signup"><b>Sign Up</b></a>
</button>
I tried JavaScript onclick and redirecting – even that is not working.
Best Answer
This doesn't work because it is not allowed by HTML5:
Interactive content means any of the following elements:
If it does work in some browsers it's just because they're trying to play nice with malformed markup and provide some sort of meaningful result.
In other words: rewrite your HTML, it's a mess. If you want the links to look like they're in a button, put them in a
div
element and style that to look like one, instead of abusing semantically wrong elements for it.