HTML/Tableau/Espaces autour d'une image
Résolu/Fermé
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
-
21 sept. 2008 à 03:24
Igoromus - 10 avril 2009 à 23:19
Igoromus - 10 avril 2009 à 23:19
A voir également:
- HTML/Tableau/Espaces autour d'une image
- Tableau croisé dynamique - Guide
- Tableau ascii - Guide
- Tableau word - Guide
- Image iso - Guide
- Editeur html - Télécharger - HTML
6 réponses
Une explication sur cet espace génant et comment s'en debarasser :
https://developer.mozilla.org/fr/docs/Archive/Misc_top_level/Images,_tableaux_et_d%C3%A9calages_myst%C3%A9rieux
https://developer.mozilla.org/fr/docs/Archive/Misc_top_level/Images,_tableaux_et_d%C3%A9calages_myst%C3%A9rieux
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
35
21 sept. 2008 à 15:14
21 sept. 2008 à 15:14
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 ?
zzzrod
Messages postés
28
Date d'inscription
samedi 20 septembre 2008
Statut
Membre
Dernière intervention
13 novembre 2011
3
21 sept. 2008 à 20:09
21 sept. 2008 à 20:09
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:
https://www.cssdebutant.com/
http://www.cssplay.co.uk
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:
https://www.cssdebutant.com/
http://www.cssplay.co.uk
alexou1984
Messages postés
375
Date d'inscription
mardi 13 mai 2008
Statut
Membre
Dernière intervention
15 février 2010
35
22 sept. 2008 à 01:21
22 sept. 2008 à 01:21
Merci beaucoup pour les réponses.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
zzzrod
Messages postés
28
Date d'inscription
samedi 20 septembre 2008
Statut
Membre
Dernière intervention
13 novembre 2011
3
21 sept. 2008 à 04:09
21 sept. 2008 à 04:09
<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>
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>
zzzrod
Messages postés
28
Date d'inscription
samedi 20 septembre 2008
Statut
Membre
Dernière intervention
13 novembre 2011
3
21 sept. 2008 à 04:11
21 sept. 2008 à 04:11
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>
<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>