space between divs | Sololearn: Learn to code for FREE!


space between divs

By default, there is a space between divs How to close this gap?

11/6/2021 2:26:53 PM

Ali Nazarian

2 Answers

New Answer


This is because of default padding and margin, so you can select div and set margin and padding to 0, or value you need. Most developer do "resets" by selecting all elements, or root or elements thay need.. * { margin: 0; padding: 0; } This is more about resets, with some example


Open the developer panel in a browser and see what exactly indents. After this change css file (margin or padding)