AoR Zeta
01-13-2008, 03:13 PM
Let's say I have...
<div style="background-color:red;height:100px;width:100px;">
<a href="page.php" title="Go to Page.">Click me</a>
</div>
Now, if I want to make it so clicking anywhere in the red div will follow the link inside it. I would do something... like this:
<div style="background-color:red;height:100px;width:100px;">
<a href="page.php" title="Go to Page." style="display:block;height:100%;width:100%;">Click me</a>
</div>
With that, clicking anywhere in the red div will follow the link. I know this... I also know that there are other ways to do it (I have a little trick that I do using the jQuery Javascript library sometimes).
What I'd like to know is, is this an acceptable/the right way of doing it? Thanks.
<div style="background-color:red;height:100px;width:100px;">
<a href="page.php" title="Go to Page.">Click me</a>
</div>
Now, if I want to make it so clicking anywhere in the red div will follow the link inside it. I would do something... like this:
<div style="background-color:red;height:100px;width:100px;">
<a href="page.php" title="Go to Page." style="display:block;height:100%;width:100%;">Click me</a>
</div>
With that, clicking anywhere in the red div will follow the link. I know this... I also know that there are other ways to do it (I have a little trick that I do using the jQuery Javascript library sometimes).
What I'd like to know is, is this an acceptable/the right way of doing it? Thanks.