I am trying to create 3 div boxes that are next to each other with some spacing in between them and get moved based on the size of the screen
So far I have the following code:
body {
min-height: 450px;
height: 100vh;
margin: 0;
background: radial-gradient(ellipse farthest-corner at center top, #f39264 0%, #f2606f 100%);
color: #fff;
font-family: 'Open Sans', sans-serif;
}
.leaderboard {
position: relative;
top: 50%;
left: 33%;
right: 33%;
float: left;
margin: 1%;
transform: translate(-50%, -50%);
width: 285px;
height: 308px;
background: linear-gradient(to bottom, #3a404d, #181c26);
border-radius: 10px;
box-shadow: 0 7px 30px rgba(62, 9, 11, 0.3);
}
<div class="leaderboard">
</div>
<div class="leaderboard">
</div>
<div class="leaderboard">
</div>
I am having the following problem - when I try to shrink the page sideways the space between the right-most div and the right side of the page shrinks faster than the space between the left-most div and the left side of the page.
I am trying to make the space between the side divs and the sides of the page symmetrical.