gsiradze
gsiradze

Reputation: 4733

Disable image button border

I'm using asp.net ImageButton and it looks like:

enter image description here

I want to remove that blue border. I have tried

border: 0px;
border-style:none;

But same result.. How can I solve that?

I'm using that for voting system and I want to execute some server side code on this button click

Upvotes: 0

Views: 5223

Answers (4)

Amit Singh
Amit Singh

Reputation: 11

Create class like this and choose your image to show on button. include class in button. see below :

Css Style :

.btn {border:none; background:url(image/loader.gif); }

Your Button Code :

<input type="button" value="Submit" class="btn" />

Upvotes: 1

chiapa
chiapa

Reputation: 4412

If you are setting your image as a CSS background, this issue may solvable by setting the image via URL.

Upvotes: 1

Leo
Leo

Reputation: 14820

Assuming that the border is NOT part of the image. This is what you can try:

  1. border:none;
  2. outline:none
  3. append the !important declaration just in case there is some overriding your styles

Example

<asp:ImageButton ID="btnLike" runat="server" style="border:none !important;outline:none !important" .../>

Update based on comment

Since you are setting the image as a background image (dunnot why since you're already using an ImageButton) make sure that the background of your button has no color...background-color: transparent

Upvotes: 4

Ahmed Mohsen
Ahmed Mohsen

Reputation: 112

try this , in CSS file

 border: 0px solid transparent;
 outline: transparent solid 0px;

Upvotes: 0

Related Questions