I am experimenting with html/css and trying to learn them. But i have a small question about calculating the box sizes.
I have tried to understand them using px as an unit and everytings adds up but when I switched to vh,vw,% something unordinary happerens and I have no idea why.
So I would be really appriciated if you can explain me what is going on.
Thank you.
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="reset.css">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="bir">
<h1> Alper </h1>
</div>
</body>
</html>
body {
background-color: red;
}
.bir {
background-color: pink;
height: 20vh;
font-size: 10vh;
}
.bir h1 {
background-color: grey;
padding: 5vh 0;
width: 100vw;
}