0
I Need help guys
My code has 3 section. The last two sections has the same background color . But my challenge is dat i want to remove the gap thats inbetween these div sections. I have tried alot by setting margin to 0 but di(nt work. https://code.sololearn.com/Wfh3Qr02kfJc/?ref=app
7 Antworten
+ 2
The default value for div is display: block
Try display: inline-block to remove the gap.
div{
display:inline-block;
padding:0px;
margin:0px;
}
Then you can change the margin for each div as you wish.
https://code.sololearn.com/WdqGFSxW70N7/?ref=app
+ 3
Share your code
+ 2
Well, you can force it with negative margins, but you'd probably be better served adding a container around them both for applying the background color.
+ 2
Another div is probably fine since it's a non-semantic use case.
0
Pls check
0
How can i add cointainer to it
0
Thanks everyone