IE Showing black border outline on submit button

2019-08-23 15:20发布

问题:

I am trying to understand why IE 7>10 is showing a black border on a submit button. In order to clear it, I have to click inside the fieldset and then it goes away. But comes back when I click send or cancel. Is this a common problem with IE? I have included screenshot. Thanks!

css code

.submit
        {

        margin:-50px 0 0 -148px;
        background-color:#eee;
        height:40px;
        width:120px;
        padding:0;
        border:1px solid #666;
        color:#42A0FF;

        }

.cancel
        {

        margin: -51px 0 0 -20px;
        background-color:#eee;
        height:40px;
        width:120px;
        padding:0;
        border:1px solid #666;
        color:#42A0FF;

        }

fieldset
        {

        background:#f2f2e6;
        border-color:#cccccc #cccccc #cccccc #cccccc;
        margin:10px 0 46px -150px;
        width:404px;
        display:block;
        text-height:10px;
        padding-bottom:15px;
        }

回答1:

Try resetting the main input

 input {border:0; margin:0;padding:0;}

And add a span to give the span the border you want so it will work universally:

.input-shell {border: #ccc 1px solid}

<span class="input-shell"><input button /></span>....

Heres a JSFIDDLE:

http://jsfiddle.net/Riskbreaker/tqnhg/1/

Heres a ref of same thing:

Any way to remove IEs black border around submit button in active forms?

Finally do this:

  input[type=submit],
    input[type=reset],
    input[type=button]
    {
        filter:chroma(color=#000000);
        color:#cccccc;
    }