Navin Rauniyar Navin Rauniyar - 5 months ago 14
CSS Question

min-height is not overriding

I've the following css:

textarea{
height: 200px;
min-height: 200px;
}


And I want to override for some textarea:

<textarea style="height:auto;min-height:auto;"></textarea>


And as far as I know inline-style takes priority but why it's taking from external css?

here is the fiddle

Answer

min-height doesn't have auto value so you are feeling it's not overriding. Just change it to 0 and see if it works.

<textarea style="height:auto;min-height:0;"></textarea>

working fiddle