views:

262

answers:

3

as specified by CSS 2.1:

input[type=submit] {
}

or

input[type="submit"] {
}

must matches any input element whose "type" attribute value is exactly equal to "submit". However this selector doesn't works on IE8 (and IE7 compatibility mode). Any hint? workarounds?

+1  A: 

jQuery will give you the selectors you need without dirty hacks.

$(':submit').css( 'styleprop', 'value' );

Example:

$(':submit').css('color','red');

www.jquery.com

Stefan Kendall
A: 

internet explorer doesn't retroactively apply styles though.

and the use of those jquery selectors only applies to elements present before that code is run.

anything created and inserted into the DOM afterwards won't be affected by that code.

+1  A: 

Check here: http://stackoverflow.com/questions/2185549/css-attribute-selector-for-input-typebutton-not-working-on-ie7/3386459#3386459

Check to make sure you have a DOCTYPE defined at the top of your page.

Sofox