开发者

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

开发者 https://www.devze.com 2023-03-29 22:17 出处:网络
Here\'s a screenshot. And my CSS markup: .submitbutton { back开发者_开发知识库ground: url(\"/Content/SiteImages/button.png\") no-repeat scroll 0 0 transparent;

Here's a screenshot.

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

And my CSS markup:

.submitbutton
{
    back开发者_开发知识库ground: 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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消