user2953775
user2953775

Reputation:

How to remove the border around the image?

How to remove the border around the square?

How it looks:

Screenshot of the undesired effect

My HTML:

<input id="black" type="image" src="html5-canvas-drawing-app/images/color-swatch-brown.png" onClick="changeColorBlack()">

My CSS:

#black{
border:none;
outline:none;
background:none;
padding:0;
}

Upvotes: 2

Views: 363

Answers (3)

miercoledi
miercoledi

Reputation: 286

For whatever reasons, stylesheets text/css are not very universally-predictable. Still, this should clear you all around:

img#black {
    border: 0px solid #00000;
    padding: 0 0 0 0;
    margin: 0 0 0 0;
}

Toss that in your style.css or whatever. Not all of it may be necessary at the moment, but it will protect you from weird inheritance problems that may arise down the road.

Upvotes: 1

vinay Maneti
vinay Maneti

Reputation: 1451

border: 0;

put in the My css file....

Upvotes: 3

Havenard
Havenard

Reputation: 27934

To disappear with it, set it's thickness to 0 instead:

border: 0;

Upvotes: 3

Related Questions