This problem is specific to Safari 5.0
and Safari 5.1 + Win7
- as far as tests done by others are concerned.
Andrew M said it's working on Safari 6.0, 5.1
and Firefox 11
- both in Windows
(no version mentioned, perhaps not Win 7
) - and Mac.
I just tested the code below on Safari 6.0.2
, Chrome 24.0.1
, Firefox 18.0.1
, and can confirm it's working. Doesn't work on Opera 12.10
. All tested on OSX Lion
. http://jsfiddle.net/dreamyguy/ZzdPH/
HTML
<input type="text" placeholder="Lorem ipsum" />
CSS
input { width: 200px; }
::-webkit-input-placeholder {
text-align:center;
}
:-moz-placeholder {
text-align:center;
}
:-ms-input-placeholder {
text-align:center;
}
Maybe you should edit this question and make it specific to Safari version 5.0 and below, since it's a Safari specific question because the issue has been fixed in later versions.
This reference may be useful too: http://blog.ajcw.com/2011/02/styling-the-html5-placeholder/