Knowledge Walls
Venkatesan
Hyderabad, Andhra Pradesh, India
Passcode:
How to create div width and height as 100% percentage in HTML with CSS
1533 Views
Root Div absolute and scrollable 
After body for the while page content coming under one outer div. make that div as absolute and scrollable auto. Makes page body content will take height 100% and width 100%.

<div style="height: 100%; position: absolute; width: 100%; overflow: auto;">
</div>
Example
<HTML>
    <HEAD>
        <TITLE>DIV HEIGHT 100% EXAMPLE</TITLE>
    </HEAD>
    <BODY>
        <DIV style="height: 100%; position: absolute; width: 100%; overflow: auto;background-color: skyblue;">
            Good to see 100% Height
            Put all your body content here
        </DIV>
    </BODY>
</HTML>
Output 
Demo 
Best Lessons of "WEB UI Tips and Tricks"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details