Bonjour a tou(te)s,
Voici le petit problème du jour:
j'ai un tableau dans lequel sont affichés des textes de taille variable (format date ou texte). Je voudrais élargir mes <td> contenant du texte.
Le code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <table border="1"> <tr> <td class="tab_intitule_admin" title="ID"> ID </td> <td class="tab_intitule_admin" title="Date de création"> Date de</br>création </td> <td class="tab_intitule_admin" title="Titre"> Titre </td> <td class="tab_intitule_admin" title="Description" width="100px"> Texte </td>...Et dans le css (sait-on jamais):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <tr class="'.$class_ligne.'"> <td class="tab_cellule_admin" title="ID"> '.$liste[$i][0].' </td> <td class="tab_cellule_admin" title="Date"> '.$liste[$i][15].' </td> <td class="tab_cellule_admin" title="Titre"> '.html_entity_decode(stripslashes($liste[$i][10]), ENT_QUOTES, 'ISO-8859-15').' </td> <td class="tab_cellule_admin" title="Description" width="100px"> '.html_entity_decode(stripslashes(trim($liste[$i][11])), ENT_QUOTES, 'ISO-8859-15').' </td>....
J'y ajoute les headers:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 tr.tab_ligne_ok { background-color: none; } tr.tab_ligne_pb { background-color: red; } tr.tab_ligne_non_accepte { background-color: pink; } tr.tab_ligne_non_confirme { background-color: yellow; } td.tab_intitule_admin { margin: 0; padding: 0 10px 0 10px; padding-left: 10px; color: #000000; font-size: 11px; font-style: normal; font-family: Arial, Verdana, Helvetica, sans-serif; font-weight: bold; } td.tab_cellule_admin { margin: 0; padding: 0 10px 0 10px; padding-left: 10px; color: #000000; font-size: 11px; font-style: normal; font-family: Arial, Verdana, Helvetica, sans-serif; font-weight: normal; }
J'ai essayé l'attribut width dans la balise <td> mais il ne semble pas pris en compte; ensuite, j'ai tenté de définir la largeur d'une cellule par css et là non plus rien.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10 <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="description" content="'._DESC_SITE.'"/> <meta name="keywords" content="'._NOM_SITE.'" /> <meta name="author" content="'._AUTHOR_SITE.'"/> <title>'.$titre.'</title> <link rel="stylesheet" type="text/css" href="'._URL_ROOT.'/vues/css/style.css"/> </head>
Partager