css precedence ambiguity -



css precedence ambiguity -

i have next css rules:

input[type="submit"],input[type="reset"]{ background-image:url(skins/images/bg_mega_hdr_on.png); background-repeat:no-repeat; padding:5px; margin:5px; color:#000; cursor:pointer; } #submit-search{ background-image:url(skins/images/bg_blue.png) !important; }

now according css rule, id selector has higher precedence on generic selector why that, when apply rule, sec 1 overridden first one? note have applied !important, first 1 applied.

something id="submit-search " notice space can cause odd selector behaviors ! ps . cant comment yet , little points ...

css precedence

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -