Autor Tema: HTML y CSS Border-collapse. Tablas y su estructura bordes Ejercicio CU01051D  (Leído 2003 veces)

Chompy129

  • Intermedio
  • ***
  • Mensajes: 130
  • Programar es divertido. :)
    • Ver Perfil
Estilos y herencia CSS en tablas. Width, height, font-size y overflow en tablas. border-collapse (CU01051D)

Aquí esta el ejercicio ya resuelto CU01051D del curso Bases de la programación web con CSS:

Código HTML(CSS interno)
Código: [Seleccionar]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Border-collapse</title>
<link href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<style type="text/css">
/*DATOS GENERALES*/
*{font: 1em "Ubuntu", arial, sans-serif;}
caption{font-size: 1.5em; font-weight: 800; font-style: italic;}

/*Estilos de tablas*/
#T-estilo1{width:600px; border-collapse: collapse;}
#T-estilo1 tr th, #T-estilo1 tr td{width: 20%; border: 8px solid gray;}

#T-estilo2{width: 100%; border: 2px solid brown;}
#T-estilo2 tr th, #T-estilo2 tr td{width: 20%; border: 2px solid brown;}

#T-estilo3{width: 500px; border-collapse: collapse; border-bottom: 6px solid #00F;}
#T-estilo3 tr th, #T-estilo3 tr td{width: 100px; border-bottom: 6px solid #00F;}
</style>
</head>
<body>
<!--Una tabla de 5 columnas y 7 filas-->
<table id="T-estilo1">
<caption>Calificaciones</caption>
<tr>
<th>Persona</th>
<th>Matemáticas</th>
<th>Ciencias</th>
<th>Biologia</th>
<th>Química</th>
</tr>
<tr>
<td>Antonio</td>
<td>15</td>
<td>13</td>
<td>17</td>
<td>18</td>
</tr>
<tr>
<td>Juan</td>
<td>18</td>
<td>18</td>
<td>14</td>
<td>18</td>
</tr>
<tr>
<td>Maria</td>
<td>15</td>
<td>14</td>
<td>18</td>
<td>19</td>
</tr>
<tr>
<td>Miranda</td>
<td>20</td>
<td>20</td>
<td>09</td>
<td>15</td>
</tr>
<tr>
<td>Soka</td>
<td>18</td>
<td>17</td>
<td>16</td>
<td>20</td>
</tr>
<tr>
<td>Vanessa</td>
<td>14</td>
<td>17</td>
<td>08</td>
<td>18</td>
</tr>
</table>
<table id="T-estilo2">
<caption>Calificaciones</caption>
<tr>
<th>Persona</th>
<th>Matemáticas</th>
<th>Ciencias</th>
<th>Biologia</th>
<th>Química</th>
</tr>
<tr>
<td>Antonio</td>
<td>15</td>
<td>13</td>
<td>17</td>
<td>18</td>
</tr>
<tr>
<td>Juan</td>
<td>18</td>
<td>18</td>
<td>14</td>
<td>18</td>
</tr>
<tr>
<td>Maria</td>
<td>15</td>
<td>14</td>
<td>18</td>
<td>19</td>
</tr>
<tr>
<td>Miranda</td>
<td>20</td>
<td>20</td>
<td>09</td>
<td>15</td>
</tr>
<tr>
<td>Soka</td>
<td>18</td>
<td>17</td>
<td>16</td>
<td>20</td>
</tr>
<tr>
<td>Vanessa</td>
<td>14</td>
<td>17</td>
<td>08</td>
<td>18</td>
</tr>
</table>
<table id="T-estilo3">
<caption>Calificaciones</caption>
<tr>
<th>Persona</th>
<th>Matemáticas</th>
<th>Ciencias</th>
<th>Biologia</th>
<th>Química</th>
</tr>
<tr>
<td>Antonio</td>
<td>15</td>
<td>13</td>
<td>17</td>
<td>18</td>
</tr>
<tr>
<td>Juan</td>
<td>18</td>
<td>18</td>
<td>14</td>
<td>18</td>
</tr>
<tr>
<td>Maria</td>
<td>15</td>
<td>14</td>
<td>18</td>
<td>19</td>
</tr>
<tr>
<td>Miranda</td>
<td>20</td>
<td>20</td>
<td>09</td>
<td>15</td>
</tr>
<tr>
<td>Soka</td>
<td>18</td>
<td>17</td>
<td>16</td>
<td>20</td>
</tr>
<tr>
<td>Vanessa</td>
<td>14</td>
<td>17</td>
<td>08</td>
<td>18</td>
</tr>
</table>
</body>
</html>
« Última modificación: 01 de Octubre 2016, 12:11 por Alex Rodríguez »

pedro,,

  • Moderador Global
  • Experto
  • *******
  • APR2.COM
  • Mensajes: 1292
    • Ver Perfil
Re:HTML y CSS Border-collapse. Tablas y su estructura. Ejercicio CU01051D
« Respuesta #1 en: 26 de Septiembre 2016, 00:21 »
Hola Chompy129.

Tu ejercicio está muy bien.

Solo decirte que no hubiese hecho falta repetir la línea

Código: [Seleccionar]
border-bottom: 6px solid #00F;
en la última tabla, puesto que con el borde inferior de la última fila, ya está creando ese borde.

Saludos. ;D

 

Sobre la educación, sólo puedo decir que es el tema más importante en el que nosotros, como pueblo, debemos involucrarnos.

Abraham Lincoln (1808-1865) Presidente estadounidense.

aprenderaprogramar.com: Desde 2006 comprometidos con la didáctica y divulgación de la programación

Preguntas y respuestas

¿Cómo establecer o cambiar la imagen asociada (avatar) de usuario?
  1. Inicia sesión con tu nombre de usuario y contraseña.
  2. Pulsa en perfil --> perfil del foro
  3. Elige la imagen personalizada que quieras usar. Puedes escogerla de una galería de imágenes o subirla desde tu ordenador.
  4. En la parte final de la página pulsa el botón "cambiar perfil".