css - How to make a div expand to right side of page and bottom of page -


i need create div has top left corner aligned top left corner of parent div, right side aligned right edge of page, , bottom side aligned bottom of page. know how can done css?

where <div> itself?

you achieve vh , vw units if position absolute parent too;

div.parent{   position: absolute;    top: 10vh;    left: 10vw; }  div.child{   position: absolute;   top: 0;   left: 0;   width: 90vw; // remainder of viewport width   height: 90vh; // remainder of viewport height } 

this make div.child aligned left of div.parent, stretching length , height of browser.

if want calculated, you'll ideally want use javascript/jquery.


Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -