Making a div with an image + header + P inside all linkable without javascript

retrokid

New Member
I'm trying to get a div that when hovered shows a hidden h2 + P (using CSS), and i want the entire div (including h2 + p) to be linkable to X.The only way so far i've managed to make it work is by making the A wrap everything, but this is of course only HTML5 valid, so some browsers (IE) will not like it.\[code\]<a href="http://stackoverflow.com/questions/14468775/#"> <div class="one"> <img src="http://stackoverflow.com/questions/14468775/#"> <p>one</p> </div></a>\[/code\]I also can't give each block a separate \[code\]<a>\[/code\] as I want to change the color on hover, so the whole div needs to be hoverable. And even if i went that way, surely giving a post excerpt (the \[code\]<P>\[/code\]) would surely be bad for seo?Essentially this is what I want the final result to be:\[code\]<div class="one"> <img src"#"> <p>test</p> <a href="http://stackoverflow.com/questions/14468775/#" class="special"></a></div>\[/code\] and on one:hover, to have the entire div be a link (href="http://stackoverflow.com/questions/14468775/#").There must be a way to do this!
 
Back
Top