We help IT Professionals succeed at work.

table with min and max height

Sthokala
Sthokala asked
on
Hi,
  I created table inside div. can I use min height and max height of the div. I want the min height be 50 px and max height be 400 px. Please let me know how can I do it.


Thank you
Comment
Watch Question

Top Expert 2013

Commented:
in the CSS:

.tablebox {min-height: 50px; max-height:400px}


then apply the class to the div this way:

<div class="tablebox">

min-height property may not behave equally in all the browsers. Here is a quick hack for min-height

http://www.dustindiaz.com/min-height-fast-hack/
Top Expert 2013
Commented:
That is an old hack for old IE browsers that have pretty much disappeared.  AFAIK all modern browser implement min-height the same way.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.