Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- hyperlinking a div


lucy24 - 8:30 am on Oct 30, 2012 (gmt 0)


What's the span for? If you need styling, you can attach it directly to the "a" element.

Putting a whole div-- or any block-level element, or even whole layers of them-- inside a link will unfortunately work in most browsers. I say unfortunately because it's baaaad and you should never do it.

I was recently in a situation where it would have been oh so much easier to wrap the link around a div, which in turn contained both an image and a paragraph. And I knew it would work, at least with the intended audience. But I couldn't bring myself to do it. Stuck between a rock and a hard place, I went with js "onclick" instead :(


Thread source:: http://www.webmasterworld.com/css/4513519.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com