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

+3

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

+3

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 http://web.simmons.edu/~grovesd/comm244/notes/week4/css-reset

+2

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