css - Hovering all images on a td? -
i want hover images on td or on table. found way came tiring me. way : classed of images 1 one , css'ed them hover.
but want shortway instead of this. want group pictures , hover them. images on td or table. how can this?
tried <div> td didn't work. help.
try this. using > after td in css, apply style img direct child of td. if not direct child can remover >.
td>img{ width:100px; display:inline-block; margin:10px; } td>img:hover{ opacity:0.2; cursor:pointer; } <table> <tr> <td class="hoverover"><img src="http://www.chinabuddhismencyclopedia.com/en/images/thumb/b/b8/nature.jpg/240px-nature.jpg"></td> <td class="hoverover"><img src="http://www.chinabuddhismencyclopedia.com/en/images/thumb/b/b8/nature.jpg/240px-nature.jpg"></td> <td class="hoverover"><img src="http://www.chinabuddhismencyclopedia.com/en/images/thumb/b/b8/nature.jpg/240px-nature.jpg"></td> <td class="hoverover"><img src="http://www.chinabuddhismencyclopedia.com/en/images/thumb/b/b8/nature.jpg/240px-nature.jpg"></td> </tr> </table>
Comments
Post a Comment