I set height
= 100% for html
and body
, but I see the vertical scroll. How can I fit my body
without the scroll?
Also, I placed into the body
two div
elements with height
= 50%
, but I see the bottom border is out of the area of my body
. Why does it happen and how can I fix it?
html, body {
height: 100%;
}
body {
border-color: #00cc00;
border-width: thin;
border-style: solid;
min-height: 100%;
}
.div1 {
border-color: #0099ff;
border-width: thin;
border-style: solid;
height: 50%;
width: 50%;
}
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8"/>
<title>Sandbox</title>
</head>
<body>
<div class="div1"></div>
<div class="div1"></div>
</body>
</html>