I am working on a big form and it contains a lot of buttons all over the form, therefore I am trying to get working input[type="button"] in my main css file so it would catch all buttons with out having to add a class to every single one, for some reason this is not working on IE7, after checking on the web it says that IE7 should be supporting this.
Also it has to be type="button" and not type="submit" as not all buttons will submit the form.
Could anybody give a hint what am I doing wrong?
input[type="button"] {
text-align:center;
}
I have also tried input[type=button]
I was struggling getting input[type=button]
selectors working in IE7 or IE8. The problem turned out to be that the HTML Pages were missing a "!DOCTYPE" declaration. Once I added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Then everything worked fine. You can obviously use a different "!DOCTYPE" declaration to suit your requirements.