100% Height with CSS

   HTML y CSS, Tips Avanzados   January 10th, 2007   Enviar por e-mail
3 Votes | Average: 1 out of 43 Votes | Average: 1 out of 43 Votes | Average: 1 out of 43 Votes | Average: 1 out of 4 (3 votos, promedio: 1 de 4)
Loading ... Loading ...

Encontré un interesante artículo que nos muestra como lograr alturas del 100% en un contenedor/página utilizando CSS.

Although not that widely supported, I have found a way to make 100% height with CSS work in IE, Firefox and Opera. Three of the most major browsers right now. Today, I show you how to accomplish this fun little trick. First we must look at the html and body tags. In CSS’ eyes, these tags are block level elements. Meaning by default that they have a value of auto height and width. Changing these values in your CSS, you can quickly add 100% height to your design.

El CSS:

<style> html, body {margin: 0; padding: 0;} html, body, div {height: 100%;} div {width: 50%; background-color: green; margin: 0px auto 0px; text-align: center; padding: 20px;}</style>

El código en acción aquí!

Suscríbete a los comentarios con RSS RSS o haz un Trackback TrackBack a '100% Height with CSS'.

Comenta aquí

XHTML: Puedes usa estos tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Populares


Comentarios Recientes


Artículos Anteriores


Los Temas


Archivos

Acerca del Autor

Michael Müller C. es un diseñador y desarrollador de sitios web radicado en Guayaquil, Ecuador. Creador de MMC Design en 1998 y de Iconiza en el 2007.


Del Portafolio


Lo que leo


Servicios


Contribuye

¿Te ha servido la información de este blog? Considera hacer una donación a través de:

Conoce más recomendaciones personales de libros relacionados con Diseño y Desarrollo Web en Amazon.


MMC Design | michaelmuller.net | Diseño y Desarrollo Web
Macromedia Certified Developer
MMC Design