My css style sheet:
* {vertical-align:top;}
input.test {vertical-align:middle;}
This is an example of my html code:
<input class="test" /><input class="test" />
So I would like the class test to override *
I have tried:
* {vertical-align:top;}
input.test {vertical-align:middle!important;}
But it did not work on Firefox and the vertical-align is still on top…
Thank’s!
…but
vertical-align, unfortunately, isn’t a property that applies toinputelements.!importantin this context, is making no difference.input.test, in fact, is already overriding*Why that? It is a more specific selector, and CSS are all about specificity of selectors.
i.e. the rule with the most specific selector, wins.
Hence, to influence that
inputelement appearance, you should target thetdcell containing it and set thatvertical-alignvalue.