Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is this weird white border that's appearing around my HTML input submit button?

Here's a screenshot.

And my CSS markup:

.submitbutton
{
    background: url("/Content/SiteImages/button.png") no-repeat scroll 0 0 transparent;
    color: white;
    cursor: pointer;
    height: 26px;
    width: 76px;
    margin-left: 8px;
    margin-top: 12px;
}

Also, I'd like the background image to stretch to fit into the dimensions of the button. Currently it's displaying full size (I think). Any tips for this new HTML web developer?

like image 649
Only Bolivian Here Avatar asked Aug 23 '11 15:08

Only Bolivian Here


People also ask

How do I get rid of the outline button?

If you want to remove the focus around a button, you can use the CSS outline property. You need to set the “none” value of the outline property.

How do I get rid of the border around a button in CSS?

You can make a button without borders in HTML. To remove them, you have to use the border property in CSS and set it to none.


1 Answers

HTML buttons always have a border, simply setting border:0; should fix this.

like image 124
Kokos Avatar answered Sep 21 '22 10:09

Kokos