How to remove border around images? [duplicate]


This question already has an answer here:

<ul><li> <a href="/questions/2153425/how-remove-border-around-image-in-css" dir="ltr" rel="nofollow">How remove border around image in css?</a> <span class="question-originals-answer-count"> 12 answers </span> </li> </ul>

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


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;}


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"/>

<a href="http://jsfiddle.net/UpGh2/" rel="nofollow"><strong>DEMO</strong></a>

By default the setting of border is medium none color


<img src="http://www.reactiongifs.com/r/iwsyih.gif" style="margin:0px;padding:0px;border:0px"/>



<img src="http://www.reactiongifs.com/r/iwsyih.gif" style="border:0px;"/>


If you are using css attachment, then:

img{ border:0; }

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


  • UITableViewCell subclass wrong image in cell or old image bug
  • How To Wrap Tag In Comment In Javascript,Or jQuery [duplicate]
  • jParallax trouble
  • window.onbeforeunload in javascript
  • Javascript (MVC) load image (byte array) from database
  • Setting src to Base64-encoded image with Javascript is failing
  • How to stamp out template in self contained custom elements with vanilla js?
  • Is it better to use the “hidden” CSS attribute or fetch each set of new images?
  • Python PIL to extract number from image
  • cell spacing in div table
  • Outputting SharePoint Hyperlink Column as URL
  • XSLT foreach repeating nodes to flat
  • How to create a 2D image by rotating 1D vector of numbers around its center element?
  • Thread 1: EXC_BAD_ACCESS (code =1 address = 0x0)
  • Disable Kendo Autocomplete
  • Android changing fragment order inside FragmentPagerAdapter
  • Jquery popup on mouse over of calendar control
  • saving file generated by TCPDF
  • How to view images from protected folder with php?
  • Alternative To body {overflow:scroll;} That Will Prevent Page Jostling/Wriggling?
  • How do I get HTML corresponding to current DOM tree?
  • Play WS (2.2.1): post/put large request
  • How to create a file in java without a extension
  • Optimizing database types to compact database (SQLite)
  • Cross-Platform Protobuf Serialization
  • Do I've to free mysql result after storing it?
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • How to get icons for entities from eclipse?
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • Turn off referential integrity in Derby? is it possible?
  • How to get Windows thread pool to call class member function?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • JaxB to read class hierarchy
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal