O que é Holy grail layout?


0

Este artigo irá explicar o que é Holy grail layout e como usar Holy grail layout.

Layout do Santo Graal

Layout do Santo Graal

O layout do Santo Graal é um modelo de layout comumente usado em web design. Ele apresenta uma área de cabeçalho na parte superior da página e uma área de rodapé na parte inferior, abrangendo toda a largura da janela. Entre o cabeçalho e o rodapé existem três áreas de igual altura. O corpo principal do conteúdo ocupa a área central, com dois painéis de conteúdo de suporte ou elementos de interface em cada lado.

O nome “Santo Graal” refere-se a uma coisa lendária procurada. No início dos anos 2000, era difícil obter o layout do Santo Graal de maneira confiável usando as tecnologias da web existentes. Hoje, o layout do Santo Graal é trivial de implementar usando tecnologias amplamente adotadas, como CSS Grid ou Flexbox.

A primeira implementação conhecida do layout do Santo Graal usando apenas CSS foi publicada em Glish.com (não está mais ativo) em fevereiro de 2001. O CSS do layout do Santo Graal original está listado abaixo.

body {
	margin:10px 10px 0px 10px;
	padding:0px;
	}
#leftcontent {
	position: absolute;
	left:10px;
	top:50px;
	width:200px;
	background:#fff;
	border:1px solid #000;
	}
#centercontent {
	background:#fff;
		margin-left: 199px;
		margin-right:199px;
	border:1px solid #000;
/*
IE5x PC mis-implements the box model. Because of that we sometimes have
to perform a little CSS trickery to get pixel-perfect display across browsers.
The following bit of code was proposed by Tantek Celik, and it preys upon a CSS
parsing bug in IE5x PC that will prematurly close a style rule when it runs
into the string ""}"". After that string appears in a rule, then, we can override
previously set attribute values and only browsers without the parse bug will
recognize the new values. So any of the name-value pairs above this comment
that we need to override for browsers with correct box-model implementations
will be listed below.
We use the voice-family property because it is likely to be used very infrequently,
and where it is used it will be set on the body tag. So the second voice-family value 
of "inherit" will override our bogus ""}"" value and allow the proper value to
cascade down from the body tag.
The style rule immediately following this rule offers another chance for CSS2
aware browsers to pick up the values meant for correct box-model implementations.
It uses a CSS2 selector that will be ignored by IE5x PC.
Read more at http://www.glish.com/css/hacks.asp
*/
	voice-family: ""}"";
	voice-family: inherit;
		margin-left: 201px;
		margin-right:201px;
	}
html>body #centercontent {
		margin-left: 201px;
		margin-right:201px;
	}
#rightcontent {
	position: absolute;
	right:10px;
	top:50px;
	width:200px;
	background:#fff;
	border:1px solid #000;
	}
#banner {
	background:#fff;
	height:40px;
	border-top:1px solid #000;
	border-right:1px solid #000;
	border-left:1px solid #000;
	voice-family: ""}"";
	voice-family: inherit;
	height:39px;
	}
html>body #banner {
	height:39px;
	}
p,h1,pre {
	margin:0px 10px 10px 10px;
	}
h1 {
	font-size:14px;
	padding-top:10px;
	}
#banner h1 {
	font-size:14px;
	padding:10px 10px 0px 10px;
	margin:0px;
	}
#rightcontent p {
	font-size:10px
	}

Like it? Share with your friends!

0
Rubem Rego

0 Comments

Your email address will not be published. Required fields are marked *