Hola,

Quiero dar estilo a dos columnas de una tabla que tiene diez columnas,
y he optado por utilizar <colgroup>, que no había utilizado nunca, y
ponerle un atributo class para darle estilo.

Tengo este código, y me respeta el background-color, pero no el
font-weight: bold ni el centrado del texto, además, no estoy seguro de
estar utilizando correctamente el colgroup:

********************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="es">
        <head>
                <meta http-equiv="content-type" content="text/html; 
charset=utf-8" />
                <title>...</title>
                <style type="text/css">                 
                        colgroup.media {
                                font-weight: bold;
                                background-color: aqua; 
                                text-align: center;
                                }
                </style>
        </head>
        <body>
                <table summary="...">
                <caption>.....</caption>
                        <colgroup />
                        <colgroup />
                        <colgroup />
                        <colgroup class="media" />
                        <colgroup />
                        <colgroup />
                        <colgroup />
                        <colgroup class="media" />
                        <thead>
              <tr>
                <th colspan="5" align="left">Año 2005</th>
                <th colspan="5" align="left">Año 2006</th>
                </tr>
                <tr>
                      <th>Núm.</th>
                      <th>Semana</th>
                      <th>Mínimo</th>
                      <th>Media*</th>
                      <th>Máximo</th>
                      <th>Núm.</th>
                      <th>Semana</th>
                      <th>Mínimo</th>
                      <th>Media*</th>
                      <th>Máximo</th>
                </tr>
            </thead>
            <tfoot>
                <tr>
                <td colspan="10">* Media ponderada</td>
                </tr>
            </tfoot>
            <tbody>
                <tr>
                      <td>1</td>
                      <td>03-ene</td>
                      <td>1,61</td>
                      <td>1,67</td>
                      <td>1,70</td>
                      <td>1</td>
                      <td>02-ene</td>
                      <td>1,39</td>
                      <td>1,45</td>
                      <td>1,50</td>
                    </tr>
                    <tr>
                      <td>2</td>
                      <td>10-ene</td>
                      <td>1,61</td>
                      <td>1,67</td>
                      <td>1,70</td>
                      <td>2</td>
                      <td>09-ene</td>
                      <td>1,34</td>
                      <td>1,42</td>
                      <td>1,50</td>
                    </tr>
                    <tr>
                      <td>3</td>
                      <td>17-ene</td>
                      <td>1,09</td>
                      <td>1,15</td>
                      <td>1,20</td>
                      <td>3</td>
                      <td>16-ene</td>
                      <td>1,24</td>
                      <td>1,32</td>
                      <td>1,40</td>
                    </tr>
                 </tbody>
            </table>
        </body>
</html>
**********************

Gracias por la ayuda.

Un saludo.
_______________________________________________
Lista de distribución Ovillo
Para escribir a la lista, envia un correo a Ovillo@lists.ovillo.org
Puedes modificar tus datos o desuscribirte en la siguiente dirección: 
http://ovillo.org/mailman/listinfo/ovillo

Responder a