Html css adapter les cellules d'un tableau

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,
N'arrivant pas à faire un beau tableau avec une barre de défilement sur le coté j'en ai cherché un tout fait mais j'ai du de mal à tout comprendre et surtout à l'adapter à mon cas, mes soucis sont pour adapter la taille des titres des colonnes à la taille des cellules et de régler la taille des cellules par la même occasion j'espère que quelqu'un peut m'aider pour info le tableau se trouve ici : http://www.cssplay.co.uk/menu/tablescroll.html
et voici une capture : [URL=https://www.casimages.com/][img]http://nsa14.casimages.com/img/2010/07/12/100712094936516958.png[/img][/URL]
Le css :

<html>
<head>
<style type="text/css">
.tableone {width:650px; border-collapse:collapse; margin:0 auto;}
.tabletwo {width:620px; border-collapse:collapse;}
.th1 {width:10px;}
.th2 {width:10px;}
.th3 {width:10px;}
.th4 {width:10px;}
.th5 {width:10px;}
.th6 {width:10px;}
.th7 {width:20px;}
.th8 {width:10px;}

.td1 {width:0px;}
.td2 {width:10px;}
.td3 {width:10px;}
.td4 {width:10px;}
.td5 {width:10px;}
.td6 {width:10px;}
.td7 {width:20px;}
.td8 {width:10px;}
.tableone {background:#697210; border:1px solid #fff; color:#fff;}
.tableone td {border:1px solid #fff; color:#fff;}
.tableone tbody {background:#f0c992; color:#000;}
.tableone caption {background:#fff; color:#697210; font-size:1.2em; margin:0 auto;}
.tabletwo td {background:#eee; color:#000;}
.tableone th, .tabletwo th {text-align:left;}
.tabletwo tr.dk td {background:#ddd; color:#000;}

.innerb {height:10em; width:40em; overflow:auto;}
</style>

Le tableau :
<table class="tableone" >
<caption>EXERCICE n<?echo $signe.$exo?></caption>
<thead>
<tr>
<th class="th1">Heure</th>
<th class="th2">Niveau</th>
<th class="th3">Vitesse</th>
<th class="th4">Point</th>
<th class="th5">Faute</th>
<th class="th6" >Abandon</th>
<th class="th7" >Nombre de question</th>
<th class="th8" >Note</th>
</tr>
</thead>

<tbody>
<tr><td colspan="8">
<div class="innerb">
<table class="tabletwo">

<?
while ($Ligne = mysql_fetch_array($Resultat, MYSQL_BOTH))
{
?><tr class="dk"><td class="td1" align="center"><?echo $Ligne['Heure'] ;?></td>
<td class="td1" align="center"><?echo $Ligne['Niveau'] ;?></td>
<td class="td3" align="center"><?echo $Ligne['Niveau_Temps'] ;?></td>
<td class="td4" align="center"><?echo $Ligne['Bonne_Reponse'];?></td>
<td class="td5" align="center"><?echo $Ligne['Mauvaise_Reponse'] ;?></td>
<td class="td6" align="center"><?echo $Ligne['Abandon'];?></td>
<td class="td7" align="center"><?echo $Ligne['Nombre_Question'] ;?></td>
<?$note = $Ligne['Bonne_Reponse'] - $Ligne['Mauvaise_Reponse'] - (0.5 * ($Ligne['Abandon']));?>
<td class="td8"><?echo $note;?></td></tr>
<?
}
?>
</table>
</div>
</td></tr>
</tbody>
</table>

A voir également:

1 réponse

marcelo44 Messages postés 325 Date d'inscription   Statut Membre Dernière intervention   13
 
svp si quelqu'un peut m'aider merci !!!!
0