Je cherche à centrer verticalement un lien <a> contenant une image <img> de hauteur inconnue.
La solution que j'ai trouvée fonctionne bien sous FF mais pas sous IE6. Comment la faire fonctionner ? ou bien trouver une autre solution plus portable ?
Voici le code à tester :
Merci à ceux qui prendront la peine de le tester.
La solution que j'ai trouvée fonctionne bien sous FF mais pas sous IE6. Comment la faire fonctionner ? ou bien trouver une autre solution plus portable ?
Voici le code à tester :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<style>
* { margin: 0; padding: 0; }
body {font-family: "Trebuchet ms", helvetica, arial, sans-serif; font-size: x-small; }
div#photo_display {height: 440px; line-height: 440px; text-align: center; background-color: #ccc }
div#photo_display a {line-height: 440px;}
div#photo_display img {vertical-align: middle; border: none}
</style>
</head>
<body>
<div id="photo_display">
<a href="#">test <img src="http://forum.alsacreations.com/avatars/1-rafcv.jpg" alt="Test" ></a>
</div>
</body>
</html>
Merci à ceux qui prendront la peine de le tester.