Jacob Wernerowski Jacob Wernerowski - 2 months ago 7
CSS Question

How would I remove white space between images using CSS?

I'm working on a small personal project, and for the main page, it's going to be several images, one after another, each the size of the page.

I'm try to get rid of this type of spacing:

enter image description here

Any help is appreciated, thank you!

Answer

Set display: block for each img. Example in the snippet below. height is set just so the image isn't too big.

img {
  display: block;
  height: 150px;  
}
<img src="http://i.imgur.com/B5vX1kN.jpg"/>
<img src="http://i.imgur.com/KYXOUfE.png"/>