Chrome ignores the height CSS

I have the following CSS in my page. In the CSS pane I can see that chrome matched the rule on the table element. Then on the computed tab, I see that it has a different value. I’ve never seen that before. All I want is to add a vertical scroll bar to my table.

    table.scroll {
width: 40px;
height: 40px;
overflow: scroll;
overflow-x: hidden;
    }

Hi, Welcome to Sitepoint :slight_smile:

The cool thing about tables is that they expand to accommodate the content they hold. In order to do this they treat height as a minimum and therefore if you need to add a scroll mechanism you will need to surround the table in a div of a set height and apply the scrollbar to the div and not the table.

I see, ok. I will have to do something like that. thanks