Excuse me while I detach from reality.. I have a summary div which contains a small heading, a little bit of text, maybe an image. I’d like the whole summary div to be a link, something like this:
<div class="summary">
<a href="#">
<h4>Small Heading</h4>
<p>Small amount of text</p>
</a>
</div>
I’d then style the href to look like a nice box, change the H4 and P on :hover, etc etc. But putting an href there makes browsers angry.
Can anyone suggest a way of achieving the same effect without resorting to Javascript? Is that even possible?
Many thanks!
A pure CSS solution would be to do this:
Then change the A to a block element, and style the spans according to how you want the header and paragraph to look:
HTML/CSS purist will won’t like it, though!