...">

Min-height: auto does not work in Opera

I noticed that min-height does not work in Opera. I am trying something like this:

 <div class="content"><div> <div class="content newstyle"><div> 

And my CSS code:

 .content { min-height: 600px; } .newstyle { min-height: auto; } 

And Opera just acts as min-height does not exist.
If I apply some other style in .newstyle , like background or something else, then it works well. But min-height: auto doesn't seem to work ...

Any idea?

+6
source share
2 answers

CSS2.1 defines the initial min-height value as 0 , not auto . The value auto never existed in CSS2.1, so it is not valid in CSS2.1. Just use min-height: 0 instead:

 .content { min-height: 600px; } .newstyle { min-height: 0; } 
+11
source

auto; is not a valid value property for min-height and therefore Opera ignores ...

You can specify min-height with px , cm , etc., or % or inherit

Link

+5
source

All Articles