Html php scroll sur un tableau entete fixe

Résolu/Fermé
marcelo44 Messages postés 323 Date d'inscription vendredi 11 juin 2010 Statut Membre Dernière intervention 3 avril 2023 - 27 août 2010 à 14:04
marcelo44 Messages postés 323 Date d'inscription vendredi 11 juin 2010 Statut Membre Dernière intervention 3 avril 2023 - 27 août 2010 à 14:37
Bonjour,
malgré les sujets déjà posé je n'arrive pas à mettre un scroll vertical uniquement sur la partie en dessous des entêtes du tableau voici mon code simplifié la partie en php cherche dans une bdd les informations :
<table border="1">
<thead >
<tr>
<th>Heure</th>
<th>Niveau</th>
<th>Vitesse</th>
<th>Point</th>
<th>Faute</th>
<th>Abandon</th>
<th>Nombre de question</th>
<th>Note</th>
</tr>
</thead>
<tbody>

<?
while ($Ligne = mysql_fetch_array($Resultat, MYSQL_BOTH))
{
?><tr><td align="center"><?echo $Ligne['Heure'] ;?></td>
<td align="center"><?echo $Ligne['Niveau'] ;?></td>
<td align="center"><?echo $Ligne['Niveau_Temps'] ;?></td>
<td align="center"><?echo $Ligne['Bonne_Reponse'];?></td>
<td align="center"><?echo $Ligne['Mauvaise_Reponse'] ;?></td>
<td align="center"><?echo $Ligne['Abandon'];?></td>
<td align="center"><?echo $Ligne['Nombre_Question'] ;?></td>
<td ><?echo $note;?></td></tr>
<?
}
?>
</tbody>
</table>

et voilà mon css :
tbody
{
height: 150px;
overflow-y: auto;
overflow-x: hidden
}

Merci pour toute aide.

A voir également:

1 réponse

marcelo44 Messages postés 323 Date d'inscription vendredi 11 juin 2010 Statut Membre Dernière intervention 3 avril 2023 13
27 août 2010 à 14:37
finalement le scroll s'appliquait plusieurs fois dans toute la page à différent endroit je ne sais pas pourquoi... mais en mettant par exemple .scroll dans le css et class="scroll" dans le tbody c'est passé niquel
0