html - End of css class variable -


i have following class, last numbers variable.

is possible define begin wildcard?

<style> .cm-reload-ajax {border:1px solid #ff0000;} </style>  class="cm-reload-ajax30151"  

answer, did id:

div[id^="add_to_cart_update_ajax"]{text-align:right;} 

if supporting newer css3 browsers, need following selector:

http://www.w3.org/tr/css3-selectors/#attribute-substrings

example:

div[class^="cm-reload-ajax"] 

if have html like:

<p class="cm-reload-ajax1212">the 1212 text...</p> <p class="cm-reload-ajax2312">the 2312 text...</p> <p class="cm-reload-ajax3412">the 3412 text...</p> <p class="cm-reload-ajax4512">the 4512 text...</p> 

then can style these elements using css:

p[class^="cm-reload-ajax"] {     border: 1px solid gray;     margin: 1.00em; } 

see fiddle: http://jsfiddle.net/audetwebdesign/eqfj7/


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -