Am I going mad. I'm trying to remove the image border, but can't seem to shift it with this
HTML:
<img src="../_test.jpg" width="200" height="200" alt="Test">
CSS:
img {
border: 0px;
outline: none;
}
Am I going mad. I'm trying to remove the image border, but can't seem to shift it with this
HTML:
<img src="../_test.jpg" width="200" height="200" alt="Test">
CSS:
img {
border: 0px;
outline: none;
}
There are javascript solutions to handle broken images.
You could also wrap it in a div and do some tricks (this requires a space before your alt
text to show, as the "border" is within the padding area of the img). However, this is probably a bit excessive for just handling a broken image (fix your image path instead).
HTML
<div class="brokenImgBorderKill">
<img src="../_test.jpg" width="200" height="200" alt=" Test">
</div>
CSS
img {
border: 0px;
outline: none;
}
.brokenImgBorderKill {
display: inline-block;
width: 198px;
height: 198px;
overflow: hidden;
}
.brokenImgBorderKill img {
margin: -1px 0 0 -1px;
}