Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

jQuery Mobile - how to get search icon on the search bar?

jQuery Mobile - how to get search icon on the search bar?

Problem

I'm trying to implement a Search Bar
But i was not able to display the search icon on the search bar.
Here is the code (jsfiddle). I found the default style overrides my custom style.

HTML

input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; margin: .5em 0; line-height: 1.4; font-size: 16px; display: block; width: 100%; outline: 0; }

CUSTOM STYLE

#search_controls + input.ui-input-text{
    background: url('../img/search_icon.png') 98% center no-repeat!important;
    height: 26px;
    padding: .4em;
    margin: .5em;
    font-size: 15px;
    display: block;
    width: 99%!important;
    outline: 0;
}

How to address this issue?

Problem courtesy of: Priya

Solution

probably I know now what you mean... just remove the + sign in your custom CSS and it works ;-)...

example code:




  Test
Solution courtesy of: Taifun

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

jQuery Mobile - how to get search icon on the search bar?

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×