html - Is it possible to make an inner div always have a width of the full browser window regardless of its parent/s width settings and dimensions? -


this question has answer here:

is possible make inner div have width of full browser window regardless of parent/s width settings , dimensions? want make said div sit right on left of page, ie, left: 0 0 relative body element (not parent div).

my playing around can make inner div correct width content below moves (doesn't sit underneath) , still haven't figured out how move div left 0.

and make things harder; possible css2 (not use css3)?

.full-page-width {     position: absolute;     left: 0;     right: 0;     width: 100%; }  <div class="container">     <div class="row">         <div class="col-md-8">             <p>i should sit above foo</p>              <div class="full-page-width">                 <p>foo</p>             </div>              <p>i should sit below foo</p>         </div>     </div> </div> 

yes, if want can set in 2 ways know of:

first using vw , vh

div{  width:100vw;//for width  height:100vh;//for height } 

other solution using position

div{  position fixed;  left:0;//for width  right:0;//for width  top:0;//for height  bottom:0;//for height } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -