TABLA2

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    *{
        margin:0;
        padding: 0;
    }
    body{
        background-color: #f0f0f0;
    }
    .container{
        display: flex;
        justify-content: center;
        padding-top: 50;
    }
    .card{
        background-color: white;
        display: flex;
        flex-direction: column;
        width: 500px;
        border-radius: 8px;
        background-color: white;
        box-shadow: 0 2px 5px rgba( 0,0,0,0,0.1);

    }
    .card-header{
        background-color: #f8f9fa;
        border-radius: 8px 8px 0 0;
        padding:20px;
        display: flex;
        align-items: center;
          justify-content: center;
        border-bottom: 1px solid #dee2e6;

    }
    .card-body{
        padding: 30px 20px;
        background:white;
          display: flex;
        flex-direction: column;

        gap: 15px; /* Espacio entre elementos */
    }
.card-body p {
    width: 100%; /* Ocupan todo el ancho */
    text-align: center; /* Texto centrado */
}
.card-body h2 {
    width: 100%; /* Ocupan todo el ancho */
    text-align: center; /* Texto centrado */
}

    .card-body button {
        align-self: flex-start; /* ¡SOLUCIÓN! Evita que se estire */
        background-color: #0d6efd;
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 16px;
    }

   
/* ===== ESTILOS DE LA TABLA ===== */
table {
    width: 100%;                  /* Que ocupe todo el ancho */
    border-collapse: collapse;    /* Bordes juntos */
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);  /* Sombra ligera */
}

/* Bordes para celdas */
th, td {
    border: 1px solid #ddd;       /* Borde gris claro */
    padding: 10px;                 /* Espacio interno */
    text-align: left;              /* Texto a la izquierda */
}

/* Encabezados */
th {
    background-color: #4CAF50;    /* Fondo verde */
    color: white;                  /* Texto blanco */
    font-weight: bold;
}

</style>
<body>
    <div class ="container">
        <div class = "card">
            <div class="card-header">
              1
            </div>
            <div class="card-body">
             
                <h2>Special title treatment</h2>
                     <table>
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>Descripción</th>
                        <th>Sección</th>
                        <th>Gross</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>1</td>
                        <td>desenzilador das</td>
                        <td>henanienas</td>
                        <td>32.00</td>
                    </tr>
                </tbody>
            </table>
            </div>
            <div class="card-footer">
               3
            </div>
        </div>
    </div>  
</body>
</html>

Comentarios

Entradas más populares de este blog

Tutorial de CSS: De Cero a Estilizar tu Primera Página Web

layouts

Proyecto Práctico: Tarjeta de Perfil