Hi guys. I have a problem with this gap between two divs. One has a background image, second one just a background color.
When I set border for the second one (1px solid color) the gap is gone somehow! ¯_(ツ)_/¯
I kind of solve it with negative margin-top for the second one, but I don't like this solution. It's pretty sloppy I think...
Does anyone has a solution and can tell me why is this happening?
Here is my scrim:
https://scrimba.com/scrim/co40244eb924156b1bbca9abd
Thank you in advance 😊
#Unwanted gap between two divs
3 messages · Page 1 of 1 (latest)
You can use the developer tools to inspect the two adjacent elements. That might point you in the right direction to determine where the gap is originating.
Hi @merry slate just had a quick look and its the margin on the margin on your h3 in your activities section causing the issue. You can pop margin-top:0; on that or, reset all the margins in your code by using
* { margin: 0; padding: 0; }
This is a nice way to start your css code, I use it alot as it removes the browser auto adding margin and padding to elements
Using the dev tools/inspect in your browser is a great way to de bug your code to find these issues