Sam
Sam

Reputation: 281

Css for imagebutton

I have searched everywhere and cannot find a solution to setting css border to a asp image button.

Css Script on page in the header

            .HoverBorder {border:5px solid #eee;}
            .HoverBorder:hover {border:5px solid #5CB3FF;} 

Image Button on Page in Body

 <asp:ImageButton ID="ImageButton1" runat="server" CssClass="HoverBorder" SkinId="ButtonSkin" 
         ImageUrl="~/images/gnome_view_refresh.png" ToolTip="Refresh" Width="30px" Height="30px"  />

It is supposed to set a border then on hover change borders color. Any ideas why its not working as intended. All help very much appreciated.

Upvotes: 1

Views: 2800

Answers (1)

Kevron
Kevron

Reputation: 46

You can try rollover like so

 .HoverBorder:rollover {border:5px solid #5CB3FF;} 

You can also see if something in the css for SkinId "ButtonSkin" is overriding your border.

Upvotes: 2

Related Questions