Bonjour, bonjour,
voila, je voudrais faire un scroll dans un tableau pour pouvoir garder les entêtes fixes et pouvoir scroller le contenu.
voici un code que j'ai récupéré qui fonctionne sur FF mais pas sur IE.
Avez-vous une idée pour que ça fonctionne sous IE ???
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" > <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css"> table { width:100%; border:1px solid #000000; /* Juste histoire de voir le tableau */ } thead { height: 50px; /* Hauteur de tes entêtes */ } tbody { height: 150px; /* Hauteur du reste des données */ overflow-y: auto; /* Ton scroll vertical */ overflow-x:hidden; /* Scroll horizontal caché */ } td { padding-right:10px /* permet à tes infos de ne pas être caché par le scroll vertical, étant donné que l'horizontal est masqué */ } </style> </head> <body> <table> <thead> <tr> <th>Entete1</th> <th>Entete2</th> <th>Entete3</th> </tr> </thead> <tbody> <tr> <td>Cellule1</td> <td>Cellule2 Cellule2</td> <td>Cellule3</td> </tr> <tr> <td>Cellule4</td> <td>Cellule5</td> <td>Cellule6</td> </tr> <tr> <td>Cellule7</td> <td>Cellule8</td> <td>Cellule9</td> </tr> <tr> <td>Cellule10</td> <td>Cellule11</td> <td>Cellule12 Cellule12 Cellule12</td> </tr> <tr> <td>Cellule13 Cellule13 Cellule13</td> <td>Cellule14 Cellule14 Cellule14</td> <td>Cellule15 Cellule15 Cellule15</td> </tr> <tr> <td>Cellule16</td> <td>Cellule17</td> <td>Cellule18</td> </tr> <tr> <td>Cellule19</td> <td>Cellule20</td> <td>bla bla bla bla bla bla bla bla bla bla bla bla</td> </tr> </tbody> </table> </body> </html>





Répondre avec citation



)


Partager