'how to remove default border/outline from image

hey guys i want to know that how to remove border/outline from image tag, include that i am not using image in it , for example test code fiddle

HTML

<img src="" class="testClass">

CSS

.testClass{
    width: 100%;
    margin-left: 0%;
    height: 150px;
    border: 0px;
    outline : none;
}


Solution 1:[1]

What you see there is the browser's "broken image URL" image. That's what you get when the browser can't load the image. It doesn't have a border; the browser just renders something so you can see how big the missing image would be. Therefore, you can't influence the result with CSS much.

What you can do is set display: none to hide the image altogether. If you want the space to be empty, wrap it in a div with the same size.

Solution 2:[2]

Display none would remove the image, so it destroys the space it occupies, not good for the layout. Also it causes a map with areas to be inaccesible. I use an empty image to create some clickable areas for some underlying elements, so I don't want an image. The only option that works is to set opacity to 0.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Aaron Digulla
Solution 2 oyosoftware