i am a noob in CSS i have created 7 divs and their height and width are set to auto. only the height of div 1 is set to 100 px. These are placed inside div of wrapper class
when i see the output it creates a gap below div1 (gap color is black). is display:grid; effecting it?
.wrapper {
background-color: rgb(0, 0, 0);
height: 50vh;
width: 100%px;
display: grid;
}
.one {
background-color: darkgrey;
height: 100px;
width: auto;
}
.two {
background-color: rgb(0, 225, 255);
height: auto;
width: auto;
}
.three {
background-color: rgb(17, 0, 255);
height: auto;
width: auto;
}
.four {
background-color: rgb(136, 255, 0);
height: auto;
width: auto;
}
.five {
background-color: rgb(17, 0, 255);
height: auto;
width: auto;
}
.six {
background-color: rgb(217, 255, 0);
height: auto;
width: auto;
}
.seven {
background-color: rgb(255, 0, 0);
height: auto;
width: auto;
}
<div class="wrapper">
<div class="one">1</div>
<div class="two">2</div>
<div class="three">3</div>
<div class="four">4</div>
<div class="five">5</div>
<div class="six">6</div>
<div class="seven">7</div>
</div>
