Best way to extend a container in full screen

I have read a lot and saw many eaxample about how developers use this thenique to full screen a container and the most used are:

.container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

vs

html, body{
 height: 100%;
 margin: 0;
}

.container {
  min-height: 100%;
  margin: 0;
}

This are the most used methods to extend a div in full screen when the container is the child of body;
Now if you ask me the method using absolute position is not a very good idea because if you put other elements inside you can not relate to it because have a absolute position. The method using html and body 100% seems to be a little bit rudimentary so what is the best way to extend a container ?


Source: html5

Leave a Reply