Tintax wrote:
I would like to be able to use an entire div tag as a link to another
page; i.e. (logically) I would like to put <a
href="whatever.htm"><div>stuff</div></a>.
Now I understand that the HTML 4.01 and XHTML standards do now allow
this and, since I don't want the sky to fall on my head tomorrow,
thought I'd be able to find another way of doing it.
Only I can't. If anyone knows of a standards compliant way of
achieving this modest goal then I would be rather grateful.
Use initially inline content formatted as block using CSS:
<a href="whatever.html" class="fancy block">
<span>stuff</span>
<span class="none"> | </span>
<span class="para">stuff</span>
stuff
</a>
..block { display: block }
..fancy { border: 2px dashed; padding: 1ex }
..fancy:hover { border-style: solid }
..para { display: block; margin: 1em 0 }
..none { display: none }
Use some content to separate the inline parts. In this case I've used:
<span class="none"> | </span>
which is taken out from the visual layout when the stylesheet is in
effect.
--
Stanimir