How do I get rid of the space between <img> elements in a row in a html page?
css, html
Solution
You have to remove the whitespaces (linebreaks & spaces) between the tags:
<img src='/UploadedImages/86.jpg' alt='' style="..." /><img src='/UploadedImages/85.jpg' alt='' style="..." />
or make comments to keep linebreaks:
<img src='/UploadedImages/86.jpg' alt='' style="..." /><!--
--><img src='/UploadedImages/85.jpg' alt='' style="..." />
Problem
I'm displaying 3 `<img>` in a row like this: ``` <div style="width: 950px"> <img src='/UploadedImages/86.jpg' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" /> <img src='/UploadedImages/85.jpg' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" /> <img src='/UploadedImages/84.gif' alt='' style="width: 300px; margin: 0px; padding: 0px; border: 1px solid Black" /> </div> ``` As you can see I have thin black borders around the images. My problem is that there are white spaces about 5px wide between the borders of neighbouring images and I have set the margin to be 0px but it does not work. So what is happening here?