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]
input[type="button"]{ text-align:center; }
What do you expect that to do? The text in an <input type="button">
is already centered by default.
If you want to align the button itself within the parent, you have to set text-align
on the parent element, not the button.
Attribute selectors — with or without quotes — do work on IE7. It's IE6 that's the problem browser there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With