Robert Wrote:
>
> I'd like to do something like:
>   <a href="#">
>      <div>
>       <h2>Send an Invitation</h2>
>       <p>Send a invitation to....</p>
>     </div>
>   </a>
>
> I also want to ensure that a click in anywhere in the div (including 
> whitespace) follows the <a>.
>

Gotcha. This may or may not help you, but I hope it does.

If you use this HTML:
<div><h2><a href="#">Send an Inivte</a></h2><p><a href="#">Send an 
Invitation</a></p></div>

And this CSS:
h2 {
float: left;
margin: 0; padding: 0;
width: 100%;

}

p {
clear: both;
margin: 0; padding: 0;
}

a {
display: block;
width: 100%;
}


This sets the margin and padding to 0 on your p and h2 and then your 
width to 100% which would give you the desired effect--instead of using 
one big a, you would set two (or however many) for each element inside 
your div.  However, it may not work for you if you need more control 
over the look of it.  I can't think of any other legal way though 
because you can't put things inside an <a>.

Maybe somebody else has a better solution?

http://www.ohlman.com/css-d/robert2.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/

Reply via email to