I have a parent div and few other divs nested in it containing text.
what I want to do is to change the background color of my parent div on hover and redirect to another page on click
so i did
<a href="">
<div class="parentDiv">
<div>hello</div>
<div>user</div>
</div>
</a>
.parentDiv:hover{background-color:#72c1bf;cursor:pointer;text-decoration:none;}
and it actually works in IE8 and firefox but in chrome I have underlined all the single textes inside the two child divs. Why?
Because text-decorations are on
<a>tag, you need to settext-decoration: none;for the<a>tags too.But, according to the html standard, a
<a>tag, wich is an inline element, should not contain any block elements, such as<div>‘s, see html specifications