html - placeholder always align left in safari -


placeholder text gets aligned left in safari browser. working in other browser.

html:

<input type="text" class="form-input" placeholder="email address" /> 

css:

.form-input {     width: 235px;     height: 15px;         border: solid 5px #fff;     text-align: center;     padding: 10px 0px 10px 0px;      font-family: 'helvetica-bold'; } 

please see demo in fiddle

i want align placeholder @ center of input box. how this?

try it's working

code:

input {     text-align:center; }  ::-webkit-input-placeholder {    text-align:center; }  :-moz-placeholder { /* firefox 18- */    text-align:center;   }  ::-moz-placeholder {  /* firefox 19+ */    text-align:center;   }  :-ms-input-placeholder {      text-align:center;  } 

will work in safari 6 placeholder text-align property not working in safari 5.1 or older version

see support table here http://blog.ajcw.com/2011/02/styling-the-html5-placeholder/


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -