Hi I used this style in my css: input[type=submit] { background-color: #808080; color:white; font-weight:bold; } Code (markup): It's working in Firefox but not in IE Do you know a solution? Thanks for your help
Try putting 'submit' in quotation marks, thus: input[type="submit"] { background-color: #808080; color:white; font-weight:bold; } Code (markup):
Is that some sort of conditional comment syntax, the square brackets? As far as I know the best way to do this reliably is to add a class to your inputs. < input type="submit" value="this" class="input_submit" > then .input_submit { <style info here> } This should work properly in every browser with at least CSS 1 parsing.
Excellent, thanks myst_dg This is CSS 2.1 so make sure that you have your doctype correctly and explicitly specified for the behavior to work in all CSS 2.1 capable browsers.
That syntax the OP originally posted: -should work with or without the quotes (though I guess the quotes are "more correct") -should work in the other modern browsers just fine -should work in IE8 (but admittedly I haven't checked using "submit" but I have with type="text") -should I think work in IE7... IE7 has partial support for this attribute selector... for instance I can do input[type="text"] and it will work in IE7, but label[for] will not work in IE7 (will work in all the other browsers who understand attribute selectors). -shouldn't work at all, ever in IE6 (so if it's something you MUST have, use a class like goliath showed in the example)