I want the divs to extend to full height when the content doesn't fully occupy the entire body. If the content becomes larger, the div should also grow larger with that.
The following is code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<style type="text/css">
html{
height:100%;
}
body{
min-height: 100%;
background-color: lightblue;
margin:0;
}
.inner{
height: 100%;
background-color: blue;
}
.outer{
width: 70%;
height: 100%;
background-color: green;
padding:40px;
}
</style>
<div class="outer">
<div class="inner">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi voluptatibus iure aspernatur maiores tempora deserunt reiciendis aliquid quod distinctio debitis eius, nostrum obcaecati modi cum. Possimus, eos nobis explicabo corporis.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nisi voluptatibus iure aspernatur maiores tempora deserunt reiciendis aliquid quod distinctio debitis eius, nostrum obcaecati modi cum. Possimus, eos nobis explicabo corporis.
</div>
</div>
</body>
</html>
This is the link to JS Fiddle for the above code. I want the div to extend to full body height even when the content is small and also the divs should expand as the content increases.
This is a similar question, but the solution doesn't seem to work for me. I have read many similar questions, but none of them works for me. I am not able to figure it out.