My question is how could I make an element (specifically a <div>
) adapt to x% of the height of the screen, so that regardless of the equipment where it is seen has the same effect, something like what about the next image
The code I thought (which did not have the effect I thought) was this:
html, body{
background-color: #1C1C1C;
}
div{
color: #FF00FF;
border-color: red;
border-style: solid;
height: 800%;
width: 60%:;
}
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<title></title>
</head>
<body>
<div>
<p>
<i>contenido</i>
</p>
</div>
</body>
</html>
Thanks