Inicio > CSS > Conseguir height 100% de la ventana del navegador

Conseguir height 100% de la ventana del navegador

Domingo, 21 de Diciembre de 2008

Para todos aquellos que os esteis iniciando en el mundo de la maquetación os puede surgir más de una duda en cuanto a la propiedad height. Si añadimos la propiedad width:100% a cualquier elemento de la página web, automáticamente este ocupa el 100% del ancho de la ventana del navegador. Pero si hacemos lo mismo con la propiedad height esto no funciona. Esto es debido a que previamente hemos de especificarle a nuestro documento que tanto el documento html, como el body ocuparán también todo el alto de la ventana del navegador.

En resumen, para conseguir esto hay que añadir las siguientes instrucciones:

html, body {height:100%}

CSS

  1. Sábado, 18 de Julio de 2009 a las 01:41 | #1

    Great post! I’ll subscribe right now wth my feedreader software!

  2. Miércoles, 5 de Agosto de 2009 a las 18:09 | #2

    Hello Guru, what entice you to post an article. This article was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.

  3. Lunes, 10 de Agosto de 2009 a las 03:04 | #3

    Please, can you PM me and tell me few more thinks about this, I am really fan of your blog…

  4. Martes, 8 de Septiembre de 2009 a las 18:45 | #4

    Super-Duper site! I am loving it!! Will come back again - taking you feeds also, Thanks.

    vigrx

  5. Martes, 6 de Octubre de 2009 a las 03:00 | #5

    That’s Too nice, when it comes in india hope it can make a Rocking place for youngster.. hope that come true.

  6. Sábado, 24 de Octubre de 2009 a las 07:05 | #6

    Super-Duper site! I am loving it!! Will come back again - taking you feeds also, Thanks.

  7. Jueves, 17 de Diciembre de 2009 a las 11:58 | #7

    You made some good points there. I did a search on the topic and found most people will agree with your blog.

  8. Viernes, 1 de Enero de 2010 a las 05:39 | #8

    That’s Too nice, when it comes in india hope it can make a Rocking place for youngster.. hope that come true.

    rH3uYcBX

  9. Sábado, 6 de Marzo de 2010 a las 08:04 | #9

    my God, i thought you were going to chip in with some decisive insght at the end there, not leave it with ‘we leave it to you to decide’.

  1. Sin trackbacks aún.