|
|
|
|
Configuration: Windows XP Internet Explorer 7.0
<table border="0" cellpadding='0' cellspacing='0'>
ou <table border="1" bordercolor="#0011ee" cellpadding='0' cellspacing='0'> et aussi: <table border="1" bordercolor="#0011ee" align="center" cellpadding="0" cellspacing="0"> <tr> <td> <div style="background:url(a.jpg) no-repeat;" onclick="javascript:window.location='a.html';" align="center"> </td> </tr> </table> |
tu peux faire la même chose sans une table:
<div style="background:url(a.jpg) no-repeat; border:1px solid #000000; height:100px; width:150px; text-align:center;" onclick="javascript:window.location='a.html';"></div> |
Merci beaucoup pour ces réponses. Juste une question, le "no-repeat" et le "text-align:center" servent à quoi ? "text-align:center" c'est pour centrer l'image c'est ça ? |
Avec 'no-repeat' l'image ne répète pas (parce qu'elle est comme le fond/background du div).
Et 'text-align:center' c'est pour aligner le TEXT au centre du div non l'image. Pour aligner l'image faites ça: <div style="background:url(a.jpg) no-repeat; border:1px solid #000000; height:100px; width:150px; text-align:center;" onclick="javascript:window.location='a.html';" ALIGN='CENTER'></div> Ou avec une table: <table align='center'> <tr> <td> <div style="background:url(a.jpg) no-repeat; border:1px solid #000000; height:100px; width:150px; text-align:center;" onclick="javascript:window.location='a.html';"></div> </td> </tr> </table> Je vous suggère ces sites: http://www.cssdebutant.com/ http://www.cssplay.co.uk |
Merci beaucoup pour les réponses. |
Résultats pour HTML/Tableau/Espaces autour d'une image
Résultats pour HTML/Tableau/Espaces autour d'une image
Résultats pour HTML/Tableau/Espaces autour d'une image
Résultats pour HTML/Tableau/Espaces autour d'une image
Résultats pour HTML/Tableau/Espaces autour d'une image