I have a small problem with rendering a img tag with an associated with a class. I’ve recreated the issue with a simple html page.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test for image problem</title>
</head>
<body>
<style>
.image {
float: left;
cursor: pointer;
height:15px;
width:15px;
}
</style>
<p>This is a test </p>
<img class="image" id="image">
</body>
</html>
Anybody knows how to have the same behavior accross all browser ?
It’s a broken image, as you specify no
src. Point thesrcsomewhere and the border goes away.Browser rendering of broken images vary greatly cross-browser and depending on whether you include an
altattribute (which you always should). A 1px inner-border is commonly drawn in broken images in more than just Webkit. You should not deliberately include a broken or srcless image in your document. If you don’t want asrc, it shouldn’t be an<img>.