Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi every body
I have a HTML structure, something like
HTML
<body>
<div id="upperWrapper">
   <%--some elements here!--%>
</div>
<div id="main Container">
   <%--some other elements--%>
</div>
</body>

Now I want the "upperWapper" height be the same size as my device ViewPort height. I know the JQuery can do this for me ;) but I wonder if there is a pure CSS solution or some better one! any help would be appreciated
Posted
Comments

 
Share this answer
 
sorry about the duplicated question, it was just a mistake, but it's the solution found by my self so I add it here too, may be useful to some one else ;)

I should set the div height to:

height:100vh;

vh means "viewport Heigh".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900