Only Bolivian Here
Only Bolivian Here

Reputation: 36733

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?

Upvotes: 6

Views: 5429

Answers (2)

Kokos
Kokos

Reputation: 9121

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

Upvotes: 9

Madara's Ghost
Madara's Ghost

Reputation: 174957

Try stating

background: 0; outline: 0;

on it.

Note: This should only be used for testing purposes, disabling the outline makes people who navigate with their keyboards to not receive feedback when focusing on your button.

If it works, try using a more subtle outline.

Upvotes: 0

Related Questions