I want to make the background-color
for a DIV not body light gray and another div inside it dark gray. I tried the following:
-
- Setting the first div width and height to 100%
- Setting the first div min-width and min-height to 100%
- Setting the first div max-width and max-height to 100%
- Setting html and the first div width and height to 100
.div1 {
min-height: 100%;
min-width: 100%;
background-color: lightblue;
}
.div2 {
background: black;
}
<html>
<body>
<div class="div1">
<div class="div2">
</div>
</div>
</body>
</html>