r/csshelp • • Jan 29 '20

Resolved How can i make this table bigger ?

table

.content-table { border-collapse: collapse; margin: 25px 0; font-size: 0.9em; /min-width: 400px;/ border-radius: 5px 5px 0 0; overflow: hidden; box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); margin-left: auto; margin-right: auto; table-layout: fixed; width: 120px; border: 1px solid red; }

.content-table thead tr { background-color: #2894ff99; color: #ffffff; text-align: left; font-weight: bold; }

.content-table th,
.content-table td {
    padding: 12px 15px;
}

.content-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

    .content-table tbody tr:nth-of-type(even) {
        background-color: #f3f3f3;
    }

    .content-table tbody tr:last-of-type {
        border-bottom: 2px solid #2894ff99;
    }

    .content-table tbody tr.active-row {
        font-weight: bold;
        color: #4d94ff /*daca ii activ baitanu sau nu*/;
    }

.profile-image2 { width: 35px; height: 35px; border-radius: 50%; display: block; margin-left: auto; margin-right: auto;

9 Upvotes

2 comments sorted by

2

u/ForScale Jan 29 '20

Give it widths and heights. Make them bigger than what they are now.

2

u/beardChamp Jan 29 '20

The first comment is correct. You could add widths and heights. By default, a table and most other HTML elements only take up the width of their internal content unless told to do otherwise. The easiest way to have the table take up the full width of the area it is sitting in is to give it width: 100%; . From there you can give each td a consistent width, like width: 20%; for five equally sized cells, or give the th unique classes and then customize the widths of each cell (the widths for a th can help set the values for the column, but you could put the classes on all tds to make sure that nothing gets wacky). You can also check out the table-layout property on MDN to see how the table layout property can effect how a table is rendered.