CSS: Remove Whitespace Between Images (Cascading Style Sheets)

This article is all about having images display without any white space between them. By default, images are displayed as inline elements. By setting them to block elements it will remove the space between them and put them on their own line. Then, setting their margin to margin: 0 auto; will center them, a useful technique for writing responsive CSS code.

Another solution is to float: left; (or right) the images but be sure to add a <div style="clear:both;"></div> to prevent wrapping of items around the images.

Cookies are simple text files stored on the user's computer. They are used for adding features and security to this site.