Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Css attribute selector for input type="button" not working on IE7

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]

like image 510
Amra Avatar asked Feb 02 '10 16:02

Amra


1 Answers

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.

like image 127
bobince Avatar answered Sep 21 '22 03:09

bobince