0

I have a button in my asp.net webform app which looks like it's selected (has a thin black border applied) even on page load. It's not a huge issue but it's quite evident as it's sitting next to a FormUpload control with a browse button (see screen shot):

enter image description here

All other buttons on the page don't have this issue. No css styling is applied (or any other).

I thought it might be that somehow the Upload button has focus on load but giving focus to another control does nothing. In addition, clicking another button doesn't remove the border on the Upload button.

In addition it's not like the css from another part of the page is effecting it as nothing has a black border surrounding it.

I know I could probably apply a specific bit of css to the button to make it look normal but this seems unnecessary, plus I would like to know why this is happening.

Any thoughts?

sr28
  • 4,728
  • 5
  • 36
  • 67
  • try `outline:none;` and `border:none;` and check the result – Hamed mayahian Jan 22 '14 at 10:01
  • @Radian - adding a CssClass to the button with the elements you suggest removes the border, outline and shading, so it becomes just a grey rectangle. – sr28 Jan 22 '14 at 10:12
  • try `.yourClass:active{outline:none;border:none;}` and `.visited{outline:none;border:none;}` – Hamed mayahian Jan 22 '14 at 10:17
  • Which browser are we talking about here? Something like `border:thin outset; border-radius:4px;` works fine in IE9, but not when in IE8 mode). So I assume you mean IE8? – Mr Lister Jan 22 '14 at 15:09
  • It's IE8 not IE10 like I first thought – sr28 Jan 22 '14 at 15:11
  • 1
    I don't have an answer, but I found a very similar question: [IE Showing black border outline on submit button](http://stackoverflow.com/questions/17174798/ie-showing-black-border-outline-on-submit-button) – Mr Lister Jan 22 '14 at 15:27
  • Yeah, that seems to help in my understanding. It looks like IE is highlighting the Upload button as the first 'submit' button as per this question http://stackoverflow.com/questions/126445/any-way-to-remove-ies-black-border-around-submit-button-in-active-forms (a link from the 1 you found). So it looks like I'll have to resort to some css fix after all. – sr28 Jan 22 '14 at 15:41

0 Answers0