Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

min-height: auto not working in Opera

Tags:

css

opera

I have noticed that min-height is not working in Opera. I am trying something like this:

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

And my CSS code is:

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

And Opera just acts like min-height didn't exist.
If I apply any other style in .newstyle, like background or whatever, then it works well. But min-height: auto seems not to work...

Any idea?

like image 480
Alvaro Avatar asked Oct 25 '12 14:10

Alvaro


1 Answers

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

.content {
    min-height: 600px;
}
.newstyle {
    min-height: 0;
}
like image 190
BoltClock Avatar answered Oct 29 '22 16:10

BoltClock