In my jQuery mobile app , I need to position the search Icon and Place holder of a search input field at the center , I have tried the folowing code but it didnt work , the placeholder and the icon are still appearing at the left on android devices . Please help me How can I Position the SearchIcon and Placeholder at the center of the Search input field ?
<input type="search" id="SearchFilter" placeholder="Search.." />
<ul data-role="listview" data-filter="true" data-input="#SearchFilter"
data-split-icon="delete">
// All Elements
</ul>
CSS
::-webkit-input-placeholder { // its working on jsfiddle but it didnt work on mobile devices
color: grey;
text-align:center;
}
#SearchFilter{
text-shadow:none;
text-align:center;
}
.ui-icon-SearchIcon:after{
background-image: url(icons/searchIcon.png);
background-size: 100% 100%;
background-position: 0 50%;
width:32px;
height:32px;
text-align:center;
float:center;
}