Html php scroll sur un tableau entete fixe
Résolu
marcelo44
Messages postés
325
Date d'inscription
Statut
Membre
Dernière intervention
-
marcelo44 Messages postés 325 Date d'inscription Statut Membre Dernière intervention -
marcelo44 Messages postés 325 Date d'inscription Statut Membre Dernière intervention -
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.
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:
- Html php scroll sur un tableau entete fixe
- Tableau word - Guide
- Trier un tableau excel - Guide
- Tableau ascii - Guide
- Comment imprimer un tableau excel sur une seule page - Guide
- Tableau croisé dynamique - Guide