Slightly aged article, but relevant... http://html5doctor.com/block-level-links-in-html-5/
On Thu, Sep 12, 2013 at 3:28 PM, Chris Rockwell <ch...@chrisrockwell.com> wrote: > Yeah, I don't think I've ever seen/notice it failing, I just prefer to do it > this way. Putting aside the fact that it's not correct, it just looks > funny, to me, to see an <a> around a bunch of content :) > > > On Thu, Sep 12, 2013 at 3:24 PM, Tom Livingston <tom...@gmail.com> wrote: >> >> On Thu, Sep 12, 2013 at 3:19 PM, Chris Rockwell <ch...@chrisrockwell.com> >> wrote: >> > <a> is an inline element and cannot contain block level elements (such >> > as >> > <div>). >> > >> > One way is: >> > >> > .container { >> > position: relative; >> > } >> > a { >> > display: block; >> > position: absolute; >> > left:0; >> > top: 0; >> > width: 100%; >> > height: 100%; >> > text-indent: -9999em; >> > z-index: 1 /* or higher if necessary */ >> > } >> > >> > <div class="container"> >> > <div>Some content here</div> >> > <a>Link</a> >> > </div> >> > >> > >> >> This is nice. I'll have to remember this one. >> >> I will say though, that I have wrapped other elements such as div in >> an href with success in IE8+ and other "normal" browsers. >> >> -- >> >> Tom Livingston | Senior Front-End Developer | Media Logic | >> ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com > > > > > -- > Chris Rockwell -- Tom Livingston | Senior Front-End Developer | Media Logic | ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.com ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/