Reputation: 58642
I have panel
I want to set a min-height
, and max-height
to 850px; to my right panel right. ]
If I don't have anything on the list yet, I still want the panel height to be 850px.
If I have so many added on the list, I do not want the panel height to increase beyond 850px.
.nfTable {
min-height: 850px;
max-height: 850px;
}
Should I use overflow:hidden
?
Upvotes: 0
Views: 657
Reputation: 91
If you always want the panel to be 850px high you do not need to set min or max height. Min and max height are useful when a block can expand or shrink based on the content and you don't want it to expand or shrink beyond a specific size. So you should just use height: 850px;
If the content in your panel might be longer than 850px you have a couple of options. You can hide it using overflow: hidden;
if you don't want to see it at all, or you could use overflow: auto;
to allow the content to scroll if it exceeds the height of your panel. See here for more info about the CSS overflow property.
Upvotes: 1