Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Prueba imagen</title> <style type="text/css"> a img { border: 10px solid #999; } a:hover img { border: 10px solid #333; } </style> </head> <body><a href="final3.html"><img src="imagen.gif" alt="Mi imagen" width="29" height="18" /></a> </body> </html>
Tambien lo hago de estas dos maneras y tampoco, ya que con .imagen en Iexplorer se come el borde por arriba y con .imagen2 no va en ninguno:
Código HTML:
<style type="text/css"> a.imagen {border: 10px solid #999;} a.imagen:hover{border: 10px solid #CCC;} img {border: 0;} </style> <style type="text/css"> .imagen2 a{border: 10px solid #999;} .imagen2 a:hover{border: 10px solid #CCC;} </style> <a href="enlace.html" class="imagen" ><img src="imagen.gif" alt="Mi imagen" width="29" height="18" /></a> <a href="enlace.html" class="imagen2"><img src="imagen.gif" alt="Mi imagen" /></a>