| 2:51 am on Feb 2, 2010 (gmt 0)|
Hello, I don't know if that's what you're looking for but it seems that you want the whole content of the div to be clickable so why don't you wrap the heading and the paragraph in the link tag and use css to remove underline and other attributes?
| 2:27 pm on Feb 2, 2010 (gmt 0)|
@jerry95, you can't wrap a block level element (<div>, <p>, etc.) in an inline element <a>.
<a href="nextpage.php">Next Page</a>
I suspect that once the <a> isn't empty, your jQuery code might work as well.
| 1:51 am on Feb 3, 2010 (gmt 0)|
The script needs to be executed on page load, check the prefered way of doing that with jQuery, maybe ?
window.location = $(this).find("a:first").attr("href");
| 9:30 pm on Feb 5, 2010 (gmt 0)|
Thanks for the replies.
I eventually got it working.
The <a> tag is set as display:block; with a defined width and height, positioned absolutely inside the div, which works for all modern/major browsers except for IE.
| 10:56 pm on Feb 5, 2010 (gmt 0)|
|which works for all modern/major browsers except for IE. |
Is that the final fix, or does it still fail in IE?
If it does, it's because of what Fotiman says, IE abhors a vacuum. It's also true of empty table cells.
If it's still broken, at the very least, try
<a href=""> </a>
Though it should be text . . . you could add something to write to the anchor onload if you really don't want text there.
EDIT: Agh . . . what you want is an ampersand next to nbsp;, you know the entity. Recent changes to this board have begun parsing our entities. :-) Going to try a trick, let's see if it works.
Second edit: it works, but only because I tricked the board 'ware by adding an entitied ampersand (& amp;) next to the bare nbsp; if it ever gets fixed it will be hosed up.