spops
spops

Reputation: 666

min-height: 100% ignored in Firefox when set to display: table

See this jsfiddle: http://jsfiddle.net/G6vEp/1/

min-height is completely ignored when the div is set to display: table. Seems this is a bug from the latest Firefox update, as this was working fine before I updated my browser. Any other solutions for vertically centering while still maintaining min-height?

Upvotes: 1

Views: 900

Answers (1)

Marc Audet
Marc Audet

Reputation: 46785

According to the CSS specification, min-height does not apply to table columns.

See: http://www.w3.org/TR/CSS2/visudet.html#min-max-heights

However, the height value is actually treated as a minimum height value.

See: http://www.w3.org/TR/CSS21/tables.html#height-layout

In your layout, simply use height with a suitable minimum value and your will be okay. If your table-cell content gets long enough, the height of the table will expand to display the content.

Upvotes: 4

Related Questions