salut
comment je peux centrer le contenu d'un tableau parraport à ce tableau
merci d'avance et @+
Version imprimable
salut
comment je peux centrer le contenu d'un tableau parraport à ce tableau
merci d'avance et @+
Salut !
centrer le contenu du tableau ? càd ?
en générale, il te suffit de mettreCode:text-align : center;
ALors soit à l'intérieur du td avecet c'est valable que pour le tdCode:align="center"
soit pour tout le contenu du tabeau avec dant le table
Code:style="text-align:center"
merci
j'ai deja essayer tous sa mais sans resultat
j'ai un tableau qui contient des petit tableaux que je veux centrer parraport au premier
j'espere que c'est clair
@+
si c'est pour centrer des tableaux, c'est différent :
sur les tableaux que tu veux centrer.Code:margin-right : auto; margin-left : auto;
sauf qu'il me semble que ca ca ne fonctionnera que sous firefox. IE ne connait pas les marge automatique.
IE centre tout(les éléments de texte comme les autres...) avec text-align:center.
Pour centrer sur les deux il faut donc utiliser les marge automatique comme l'a dit swoog mais aussi text-align. par contre apres tout sera centrer même le texte ce n'est pas forcement ce que tu veux donc dans les zone ou tu ne veux pas que ca soit centrer tu redefinie text-align :auto ;
romain
Un code parle toujours mieux que des phrases...et moi je vois pas trop ce que tu veux faire avec tout tes tableaux imbriqués :roll:
IE accepte les marges automatiques...Citation:
Envoyé par <romain/>
j'ai déjà utilisé ça suffsament de fois pour te dire que ça foncitonne !
pas la peine de monter ton usine à gaz...
tu es sur? Parceque justement j'ai deja eu le probleme...
edit : effectivement ca fonctionne sous IE 6 et supérieur. Mais pour els version plus ancienne ca ne fonctionne pas regarde ici
;)
voici un exemple de codeCode:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45 <table align="center" width="919" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td height="75" colspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#333399"> <!--DWLayoutTable--> <tr> <td width="634" height="75"> </td> </tr> </table> </td> <td width="285"></td> </tr> <tr> <td width="258" height="107" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#006699"> <!--DWLayoutTable--> <tr> <td width="258" height="107"> </td> </tr> </table></td> <td width="376" rowspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99FF33"> <!--DWLayoutTable--> <tr> <td width="376" height="196"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td height="89" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99CC33"> <!--DWLayoutTable--> <tr> <td width="258" height="89"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td height="103" colspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99FFCC"> <!--DWLayoutTable--> <tr> <td width="634" height="103"> </td> </tr> </table> </td> <td></td> </tr> </table>
j'ai essay
et j'arrivais pas à ce que je veuxCode:margin-right : auto; margin-left : auto;
:?
edit
je l'ai mis dans la balise de la 1ere ligne :roll:
Tu pourrais être plus précis ? qu'as-tu essayé précisément ? quel est le résultat obtenu ? etc...Citation:
Envoyé par H-bil
:koi:Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 <table align="center" width="919" border="0" cellpadding="0" cellspacing="0" style="margin-right : auto; margin-left : auto;"> <!--DWLayoutTable--> <tr> <td height="75" colspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#333399"> <!--DWLayoutTable--> <tr> <td width="634" height="75"> </td> </tr> </table> </td> <td width="285"></td> </tr> <tr> <td width="258" height="107" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#006699"> <!--DWLayoutTable--> <tr> <td width="258" height="107"> </td> </tr> </table></td> <td width="376" rowspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99FF33"> <!--DWLayoutTable--> <tr> <td width="376" height="196"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td height="89" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99CC33"> <!--DWLayoutTable--> <tr> <td width="258" height="89"> </td> </tr> </table> </td> <td></td> </tr> <tr> <td height="103" colspan="2" valign="top" style="padding:4px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#99FFCC"> <!--DWLayoutTable--> <tr> <td width="634" height="103"> </td> </tr> </table> </td> <td></td> </tr> </table>
si à chaque fois tu fournis que la première info on va pas aller loin...Citation:
Envoyé par Swoög
OK
voici le resultat
je veux mettre les petit tableau au centre du tableau gris
:merci:
déjà les tableaux pour la mise en forme (voir ma signature)
mais : tableaux + CSS = :aie: lol
enfin... fait un tableau qui contient tes petits tableaux, et mets les margin sur ce tableau
ou alors essaie de mettre les margin sur chacun des petits tableaux