I am trying to fit 100% a blue square in a container but i see a little white space to the right and bottom, between the shape and the border, even if i have paddings and margins to zero and width and height to 100%. Why is that happening;
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
.cont {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.cube {
position: relative;
width: 300px;
height: 300px;
border: 1px solid black;
}
.face {
position: absolute;
width: 100%;
height: 100%;
}
.face1 {
background-color: blue;
}
<!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>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="cont">
<div class="cube">
<div class="face face1"></div>
</div>
</div>
</body>
</html>