Is there a way to make the entire area of a <div> be a proper link?
Right now I'm doing this with javascript using the onclick but this is not good since if I middle click it (on firefox) it doesn't open at all
Your best choice would probably be to turn a link into a block element.
CSS:
#mylink { display: block; }
HTML:
<a href="#" id="mylink">Some Content</a>
What do you have inside the DIV? If it's just text and other inline elements, you can just do:
<div><a href="#" style="display: block;">....</a></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With