How to control the size of cells in an HTML table?

Asked

Viewed 160 times

1

I’m trying to control the size of a cell in my HTML table using CSS properties height and width, but it’s not working.

I’m doing it this way:

#CelL7C1, #CelL3C1, #CelL3C3, #CelL7C3{
    height: 5px;
    width:20px;
    background-image: linear-gradient(to right, red , yellow);
}
  • 1

    Dude you have to put your entire table there not just a piece of CSS, without a minimal template to be able to simulate your problem not to help you ...

  • Post your table html, only this can not help.

1 answer

3


To do this you need to specify a fixed width size on table and then determine what you need in the td guy:

table {
    max-width: 90px;
}
td {
    width: 25px;
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.