On Thu, Sep 12, 2013 at 3:19 PM, Chris Rockwell <[email protected]> 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 ______________________________________________________________________ css-discuss [[email protected]] 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/
