Click here to Skip to main content
15,893,989 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have created web application. I have DropDown List and applied css Back groud image to Dropdown list.Its working in FF,IE,Opera,Chrome .but in Safari browser is not working.

My Code:

CSS
.adempsrch li select {
    padding:8px;
    background:url(../images/bg_input1.gif)  top left repeat-x;
    border: 1 !important;             /*Removes border*/
    width:80%;
    border:1px solid #666;
    margin-left:0px;
    float:left;


    /*-webkit-appearance: none;
    -moz-appearance: none; */



}
<ul class="adempsrch" >
        <li>
           <asp:Label ID="lblStatus" runat="server" Text="Status"></asp:Label><br />
           <asp:DropDownList ID="ddlStatus" runat="server">
           <asp:ListItem >All</asp:ListItem>
           <asp:ListItem Selected="True" >Active</asp:ListItem>
           <asp:ListItem >InActive</asp:ListItem>
           </asp:DropDownList>
        
        </li>

 Css Backgroud image is set in safari browser.
Please help me.

Thanks in Advance.
Posted
Comments
karthik Udhayakumar 25-Jan-14 1:23am    
Which version of Safari ?
24983 26-Jan-14 22:50pm    
safari 5.5

1 solution

This will work....

ASP.NET
<asp:dropdownlist cssclass="ddl" id="ddlGraduateYear" runat="server" xmlns:asp="#unknown" />


CSS..

CSS
.ddl {
    width: 70%;
    border: 2px solid #c7c7c7;
    height: 35px;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-top: 0px;
    border-radius: 0px;
    display: inline-block;
    -webkit-appearance:none;
    background-image: url('../Images/CommonImages/dropdownarrow.png');
    background-position: right;
    background-size: 25px 25px;
    background-repeat: no-repeat;
    text-indent: 0.01px; /*In Firefox*/
    text-overflow: '';
    vertical-align:middle;

}
 
Share this answer
 
Comments
24983 28-Jan-14 3:04am    
Hi Thanks for your nice reply...But There is arrow mark in drop down list is not display in Safari Browser.
Just Displayed box only.
Sujee1 28-Jan-14 3:06am    
Are you putting image url exactly?
And test in other browsers?
24983 28-Jan-14 3:26am    
I did put the image correct url...
I checked in Other browsers are working such as IE,OPera,Chrome,FF but Safari Only Arro mark not display.
Sujee1 28-Jan-14 3:31am    
Remove display: inline-block; in css and test.
24983 28-Jan-14 3:41am    
sorry ...I removed Inline-block then Not working in Safari
i am asking u this is working for u ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900