I am trying to display 4 even quadrants with images in them. Each quadrant will have a sidebar that takes up 20% of the main div's width.
I am trying to figure out why I am getting a scrollbar here with a small white gap at the bottom. When I inspect in developer tools it isn't showing as padding or margin.
body {
padding: 0;
margin: 0;
height: 100vh;
}
.slide {
display: flex;
flex-wrap: wrap;
}
.group {
display: flex;
width: 50%;
/* outline: solid 3px #fff; */
}
.side {
width: 20%;
background-color: red;
}
.main {
background-color: blue;
}
img {
width: 100%;
height: 100%;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Display</title>
</head>
<body>
<div class="slide">
<div class="group">
<div class="main"><img src="https://dummyimage.com/3840x2160/000/fff"></div>
<div class="side"></div>
</div>
<div class="group">
<div class="main"><img src="https://dummyimage.com/3840x2160/000/fff"></div>
<div class="side"></div>
</div>
<div class="group">
<div class="main"><img src="https://dummyimage.com/3840x2160/000/fff"></div>
<div class="side"></div>
</div>
<div class="group">
<div class="main"><img src="https://dummyimage.com/3840x2160/000/fff"></div>
<div class="side"></div>
</div>
</div>
</body>
</html>