Remove border from buttons

后端 未结 10 1392
囚心锁ツ
囚心锁ツ 2020-12-02 14:42

I tried to create buttons and insert my own images instead of the standard button images. However, the gray border from the standard buttons still remains, showing on the ou

相关标签:
10条回答
  • 2020-12-02 15:23

    I was having the same problem and even though I was styling my button in CSS it would never pick up the border:none but what worked was adding a style directly on the input button like so:

    <div style="text-align:center;">
        <input type="submit" class="SubmitButtonClass" style="border:none;" value="" />
    </div>
    
    0 讨论(0)
  • 2020-12-02 15:32

    Try using: border:0; or border:none;

    0 讨论(0)
  • 2020-12-02 15:35

    The usual trick is to make the image itself part of a link instead of a button. Then, you bind the "click" event with a custom handler.

    Frameworks like Jquery-UI or Bootstrap does this out of the box. Using one of them may ease a lot the whole application conception by the way.

    0 讨论(0)
  • 2020-12-02 15:37

    For removing the default 'blue-border' from button on button focus:

    In Html:

    <button class="new-button">New Button...</button>
    

    And in Css

    button.new-button:focus {
        outline: none;
    }
    

    Hope it helps :)

    0 讨论(0)
  • 2020-12-02 15:38

    You can also try background:none;border:0px to buttons.

    also the css selectors are div#yes button{..} and div#no button{..} . hopes it helps

    0 讨论(0)
  • 2020-12-02 15:41

    Add

    padding: 0;
    border: none;
    background: none;
    

    to your buttons.

    Demo:

    https://jsfiddle.net/Vestride/dkr9b/

    0 讨论(0)
提交回复
热议问题