Inicio » Introducción a CSS » Capítulo 16. Ejercicios resueltos » 16.11. Solución ejercicio 11
16.11. Solución ejercicio 11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Ejercicio formatear tabla</title>
<style type="text/css">
table {
font: .9em Arial, Helvetica, sans-serif;
border: 1px solid #333;
border-collapse: collapse;
text-align: center;
}
table th {
background: #F5F5F5 url(../../comun/imagenes/fondo_gris.gif) repeat-x;
padding: 0 .3em;
text-align: left;
}
table thead th {
text-align: center;
}
table th.euro {
background: #E6F3FF url(../../comun/imagenes/euro.png) no-repeat left center;
padding: 0 .3em 0 1.2em;
}
table th.dolar {
background: #E6F3FF url(../../comun/imagenes/dolar.png) no-repeat left center;
padding: 0 .3em 0 1.2em;
}
table th.libra {
background: #E6F3FF url(../../comun/imagenes/libra.png) no-repeat left center;
padding: 0 .3em 0 1.2em;
}
table th.yen {
background: #E6F3FF url(../../comun/imagenes/yen.png) no-repeat left center;
padding: 0 .3em 0 1.2em;
}
table th, table, td {
border: 1px solid #333;
line-height: 2em;
}
.par {
background-color:#FFFFCC;
}
table tr:hover {
background: #FFFF66 !important;
}
</style>
</head>
<body>
<table summary="Tipos de cambio">
<thead>
<tr class="cabecera">
<th scope="col">Cambio</th>
<th scope="col">Compra</th>
<th scope="col">Venta</th>
<th scope="col">Máximo</th>
<th scope="col">Mínimo</th>
</tr>
</thead>
<tbody>
<tr class="par">
<th scope="row" class="euro">Euro/Dolar</th>
<td>1.2524</td>
<td>1.2527</td>
<td>1.2539</td>
<td>1.2488</td>
</tr>
<tr>
<th scope="row" class="dolar">Dolar/Yen</th>
<td>119.01</td>
<td>119.05</td>
<td>119.82</td>
<td>119.82</td>
</tr>
<tr class="par">
<th scope="row" class="libra">Libra/Dolar</th>
<td>1.8606</td>
<td>1.8611</td>
<td>1.8651</td>
<td>1.8522</td>
</tr>
<tr>
<th scope="row" class="yen">Yen/Euro</th>
<td>0.6711</td>
<td>0.6705</td>
<td>0.6676</td>
<td>0.6713</td>
</tr>
</tbody>
</table>
</body>
</html>
Descargar solución completa
Puedes sugerir, comentar, criticar e informar de errores en contacto (arroba) librosweb.es