Hi.
On Sunday 01 July 2007 21:50, Robert James wrote:
> I'd like to have an entire DIV, including H2's, be a hyperlink (A).
> (Why? Imagine a web app with various panels with can be clicked on).
>
> Now, this is illegal in HTML. I'm also getting weird behavior where the
> click seems to be ignored sometimes.
>
> What is the proper way to achieve this
> - that is, making a hyperlink cover block elements?
Have you considered the <button> form element rather than using a div?
It can be styled all manner of ways, and is actually intended for the kind
of stuff I think you are trying to do. Obviously, I may be
misunderstanding your needs, but have a look at it anyway.
<form action="whatever-page" method="GET" class="invitationform">
<button type="submit" id="invitationbutton" value="sendinvitation">
<h2>Send an Invitation</h2>
<p>Send a invitation to....</p>
</button>
</form>
This is legal html, and you can style "invitationbutton" as display:block,
set hover, background, border etc. however you wish. It will all work as
one big link.
Hope this helps
Mark
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/