0

I'm a mobile developer struggling with some HTML works in my app. It looks too easy but I couldn't figure it out:

<html>
    <body>
        <img src="http://www.reactiongifs.com/r/iwsyih.gif"/>
    </body>
</html>

a white border around image appears but I don't want that happen. how to remove it? thanks

scunliffe
  • 62,582
  • 25
  • 126
  • 161
user3293835
  • 829
  • 2
  • 15
  • 30

5 Answers5

2

try this code please

img{
   border:0;
}

You can also add a class for only this image:

img.img{
  order:0;
}

<img src="http://www.reactiongifs.com/r/iwsyih.gif" class="img"/>

DEMO

By default the setting of border is medium none color

Alessandro Minoccheri
  • 35,521
  • 22
  • 122
  • 171
1
<img src="http://www.reactiongifs.com/r/iwsyih.gif" style="margin:0px;padding:0px;border:0px"/>
morepaolo
  • 631
  • 3
  • 9
1

Try:

<img src="http://www.reactiongifs.com/r/iwsyih.gif" style="border:0px;"/>
ojovirtual
  • 3,332
  • 16
  • 21
1

It's the default padding/margin on the body element. That's the purpose of a 'CSS reset'. Just add this to your styles:

body {margin: 0; padding: 0;}
ralph.m
  • 13,468
  • 3
  • 23
  • 30
0

If you are using css attachment, then:

    img{
   border:0;
}

If you are using styles in the div itself, then use style="border:0px"

neminem
  • 2,658
  • 5
  • 27
  • 36