diff --git a/estilo.css b/estilo.css index 040e932..73e911e 100644 --- a/estilo.css +++ b/estilo.css @@ -53,6 +53,12 @@ th, td { border-bottom: 1px solid #e0e0e0; } +/* Centrar columnas específicas (Año y Puntaje) */ +th:nth-child(3), td:nth-child(3), +th:nth-child(4), td:nth-child(4) { + text-align: center; +} + th { background-color: #4a69bd; color: white; diff --git a/script.js b/script.js index 234668b..8532657 100644 --- a/script.js +++ b/script.js @@ -7,8 +7,18 @@ let libros = [ function mostrarTabla(datos) { // Escribir esta función para resolver el punto 1. + const libreria = document.querySelector("#listado_libros"); + + for (const libro of libros){ + const fila = document.createElement("tr"); + fila.innerHTML = ` +