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?
>
If I understand what you are trying to do then just set the a to
display: block; and then put it inside an h2.
Style Sheet:
a {
display: block;
}
HTML:
<div><h2><a href="#">A Inside a H2</a></h2></div>
It validates and works in Firefox 2 and IE6.
See example here: http://www.ohlman.com/css-d/robert.html
Matthew
--
www.ohlman.com
______________________________________________________________________
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/