<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cultura Digital#Blog &#187; z-index</title>
	<atom:link href="http://blog.culturadigital.org/etiqueta/z-index/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.culturadigital.org</link>
	<description>Tener algo que decir; y decirlo.</description>
	<lastBuildDate>Mon, 26 Apr 2010 15:43:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Z-index para Internet Explorer: Review!</title>
		<link>http://blog.culturadigital.org/tecnologia/desarrollo-web/z-index-para-internet-explorer</link>
		<comments>http://blog.culturadigital.org/tecnologia/desarrollo-web/z-index-para-internet-explorer#comments</comments>
		<pubDate>Sun, 10 Jun 2007 00:27:04 +0000</pubDate>
		<dc:creator>J.A.Cobo</dc:creator>
				<category><![CDATA[Desarrollo web]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[La Guardia]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[z-index]]></category>

		<guid isPermaLink="false">http://blog.culturadigital.org/desarrollo-web/z-index-para-internet-explorer</guid>
		<description><![CDATA[Madre mía&#8230; las peripecias que tiene uno que hacer para el navegador de los cojoncillos de nuestro amigo Gates.
Nuevo rediseño (que supongo me traeré aquí algo modificado) de la web de La Guardia basado en un theme -con marcado basura pero que me gustaba mucho- de Askgraphics.com (más tarde hablo de ello).


Captura del Theme original [...]]]></description>
			<content:encoded><![CDATA[<p>Madre mía&#8230; las peripecias que tiene uno que hacer para el <a href="http://blog.culturadigital.org/index.php?tag=internet+explorer">navegador de los cojoncillos</a> de nuestro amigo <a href="http://blog.culturadigital.org/index.php?tag=microsoft">Gates</a>.</p>
<p>Nuevo rediseño (que supongo me traeré aquí algo modificado) de <a href="http://www.laguardiadejaen.com/web/"><strong>la web de La Guardia</strong></a> basado en un theme -con marcado basura pero que me gustaba mucho- de Askgraphics.com (más tarde hablo de ello).</p>
<div class="diapos">
<p><a href="http://blog.culturadigital.org/media/2007/09/screenshot_lgasg.jpg" title="Captura theme Gposd… de ASkGraphics"><img src="http://blog.culturadigital.org/media/2007/09/screenshot_lgasg.thumbnail.jpg" alt="Captura theme Gposd… de ASkGraphics" /></a><br />
Captura del Theme original de AskGraphics adaptado al sitio.<br />
<a href='http://blog.culturadigital.org/media/2007/09/screenshot.jpg' title="Captura theme La Guardia1.0rc"><img src="http://blog.culturadigital.org/media/2007/09/screenshot.thumbnail.jpg" alt="Captura theme La Guardia1.0rc" /></a><br />
Captura del Theme una vez modificado y &#8220;estandarizado&#8221;, sin tablas y tal&#8230; ^^.<br />
Marcado basura y marcado válido&#8230; <strong class="big">mismo aspecto!</strong>.</p>
</div>
<p>Pues bien, comienzo</p>
<h4>el rediseño del sitio:</h4>
<p><strong>Quito todas las tablas</strong> (son decorativas basicamente) de ese theme empezando por un header (cabecera) a mi gusto y la temática del sitio: La Guardia, puerta de culturas. Un theme plagado de tablas&#8230; pero plagado de verdad y acusando &#8220;divitis&#8221; (como le llama <a href="http://www.zeldman.com">J. Zeldman</a>):<br />
<span id="more-245"></span></p>
<h5>La diferencia entre &#8220;marcado basura&#8221; y marcado semántico, usable y válido:</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
</pre></td><td class="code"><pre class="xml" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;">						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #ddbb00;">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;td</span> <span style="color: #000066;">valign</span>=<span style="color: #ff0000;">&quot;top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;table</span> <span style="color: #000066;">cellpadding</span>=<span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellspacing</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;td</span> <span style="color: #000066;">valign</span>=<span style="color: #ff0000;">&quot;top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;title&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
											<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;[PHP] the_permalink();[/PHP]&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>[PHP] the_title();[/PHP]<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;subtitle&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
											Publicado por (<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>[PHP] the_author();[/PHP]<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>) en 
[PHP] the_category(', ');[/PHP] el [PHP] the_time('j/F/Y');[/PHP]
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;td</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;item_line&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;text&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
										[PHP] the_content('Read the rest of this entry <span style="color: #ddbb00;">&amp;raquo;</span>');[/PHP]
										<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
									<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/td<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
								<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/tr<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Qué le pasa a la gente????, no saben que existen, desde que los documentos web los son, LOS TÍTULOOOS <code class="noblock">h3,h4.....hasta hn!</code> madre mía&#8230;</p>
<p><strong>Mejor así</strong>, sin tablas y la mitad -o menos- de marcado, esto! es <strong class="blue">el poder de CSS</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="xml" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #808080; font-style: italic;">&lt;!--the post--&gt;</span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h3</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;post_title&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;a</span> <span style="color: #000066;">href</span>=<span style="color: #ff0000;">&quot;[PHP] the_permalink();[/PHP]&quot;</span> <span style="color: #000066;">rel</span>=<span style="color: #ff0000;">&quot;bookmark&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>[PHP] the_title();[/PHP]<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/a<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;em</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;small&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>([PHP] edit_post_link(__('e'));[/PHP])<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/em<span style="color: #000000; font-weight: bold;">&gt;</span></span><span style="color: #000000; font-weight: bold;">&lt;/h3<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;h4</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;post_subtitle&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>[PHP] _e(&quot;Filed under:&quot;);[/PHP] [PHP] the_category(',');[/PHP] [PHP] _e('by');[/PHP] 
					[PHP] the_author();[/PHP] @ <span style="color: #009900;">&lt; =? the_time<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'d/m/Y'</span>.<span style="color: #ff0000;">&quot;&amp;#8212;&quot;</span>.<span style="color: #ff0000;">'h:m'</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #66cc66;">&#91;</span>/PHP<span style="color: #66cc66;">&#93;</span>h.<span style="color: #000000; font-weight: bold;">&lt;/h4<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
					<span style="color: #808080; font-style: italic;">&lt;!--Esto necesita un DIV porque no tiene porqué ser un párrafo--&gt;</span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;post_text&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
						[PHP] the_content('Leer el resto de la entrada <span style="color: #ddbb00;">&amp;raquo;</span>');[/PHP]
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<h4>Pruebas en Navegadores:</h4>
<p>Pues eso, comienzo el diseño CSS mirando el resultado en <a href="http://www.difundefirefox.com/descargar-mozilla-firefox-gratis">Firefox</a>, <a href="http://www.gnome.org/projects/epiphany/">Epiphany</a> (Gnome), <a href="http://konqueror.org/">Konqueror</a> (KDE) y <a href="http://www.opera.com/">Opera</a>&#8230; todo perfecto con un solo diseño pero ya estaba temiendo probarlo en IE.<br />
Aún no tenía <a href="http://www.tatanka.com.br/ies4linux/page/Es/P%C3%A1gina_Inicial">IEs4Linux</a>, un paquete para Linux -uso Ubuntu Feisty- que te instala <a href="http://es.wikipedia.org/wiki/Wine">wine</a> (ya lo tenía) junto con Explorer 5.0,5.1,5.5 y 6.0 todos con sus SP correspondientes -si así lo deseas-.</p>
<h5>I.E</h5>
<p>Así que cruzo los dedos y&#8230; ggg :D no, no es una sorpresa porque siempre pasa igual:<br />
La cabecera abajo, una barra lateral a su bola pululando por el footer, un pantallón de 2.000 píxeles de ancho gggg :mrgreen:<br />
bueno no, en serio:<br />
Típico en IE se hace un lío con los anchos y los espaciados así que la barra lateral no cogía con los anchos &#8220;estándar&#8221; y se había venido abajo, pocos fallos a decir verdad para lo que esperaba&#8230; habré mejorado?? gg 8)</p>
<h5>Ajustando el Menú para IE:</h5>
<p>Bien, ajusto los anchos, márgenes y demás de acuerdo al &#8220;<a href="http://www.disenorama.com/articulos/el-modelo-de-cajas-en-CSS">modelo de cuadro</a>&#8221; personal de IE, caprichoso como siempre, pero aún los flotantes no actúan como deben, la barra lateral se estructura:</p>
<ul>
<li>Un div superior de estilo para una cabecera de la barra&#8230; :oops: , sí, no todo iba a ser perfecto :( </li>
<li>Un div contenedor del contenido de la barra y relleno de estilo.</li>
<li>Un par de listas izquierda y derecha ambas flotadas para llegar hasta la cabecera. NO HACE FALTA DOS DIVS, si son listas pos usamos UL LI , que para eso están, y no pecamos de divitis!</li>
<li>Un div de pie de estilo :oops: &#8230;pos eso.</li>
</ul>
<p><strong>Sencillo:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="xml" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #808080; font-style: italic;">&lt;!--abriendo estilo sidebar--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sidebar_top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
	<span style="color: #808080; font-style: italic;">&lt;!--sidebar--&gt;</span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sidebar&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
&nbsp;
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sidebar_right&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		[...]
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ul</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sidebar_left&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/ul<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
		<span style="color: #808080; font-style: italic;">&lt;!--cerrando estilo sidebar--&gt;</span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sidebar_end&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
&nbsp;
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #808080; font-style: italic;">&lt;!--end sidebar--&gt;</span></pre></td></tr></table></div>

<p><strong>CSS:</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="css" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #cc00cc;">#sidebar_top</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">372px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">90px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">-90px</span> <span style="color: #933;">10px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/sidebar_top.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">372px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span> <span style="color: #933;">10px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/sidebar_bg.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-y</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #00AA00;">&#91;</span>...<span style="color: #00AA00;">&#93;</span>
<span style="color: #cc00cc;">#sidebar_right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">36</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-80px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar_left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-80px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h5>Los problemas de I.E. con &#8220;float&#8221; y el modo &#8220;quirks&#8221;:</h5>
<p>Bien, pasan dos o tres cosas con IE:<br />
Lo primero es que la sidebar de contenido <code class="noblock">#sidebar</code> es más grande que la cabecera, esto es debido al &#8220;modelo de cuadro&#8221; no estándar de IE5 e IE6 en modo &#8220;quirks&#8221; -compatibilidad inversa-:</p>
<ul>
<li>El ancho de un cuadro para IE es lo que se especifica con la propiedad <code class="noblock">width</code>, el margen, el borde y el espaciado entran en ese tamaño.<br />
Y el estándar del W3C dice que el ancho es:<br />
El contenido (<code class="noblock">width</code>) + el espaciado (<code class="noblock">padding</code>) + el borde (<code class="noblock">border</code>) + el margen (<code class="noblock">margin</code>).<br />
Así, para IE la sidebar tiene 10 píxeles más de los que debería tener que salen del margen derecho.</li>
<li>La sidebar no consigue solaparse con la <code class="noblock">sidebar_top</code> pese a que está flotada con sus márgenes y espaciados, que debería ser (y de hecho lo es en el resto de navegadores) lo que coloca el cuadro.</li>
<li>Por esta regla de 3 las dos listas flotadas tampoco consiguen ascender a la cabecera (sidebar_top) y solapa a su &#8220;padre&#8221; (elemento padre: sidebar).</li>
</ul>
<h4>Solución:</h4>
<p>Especificar, no sé muy bien porqué porque ya lo son por defecto y más aún estando flotadas y sin posiciones absolutas como <code class="noblock">top: left:</code>, la posición relativa de los flotantes y establecer un nivel de solapamiento entre ellas: <code class="noblock">z-index</code>.</p>
<h5>Código para el niño bonito y mal criado de IE:</h5>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</pre></td><td class="code"><pre class="css" style="font-family:Consolas, Monaco, 'Lucida Sans Typewriter', 'Lucida Console', 'Andale Mono', monospace;"><span style="color: #cc00cc;">#sidebar</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">362px</span><span style="color: #00AA00;">;</span> <span style="color: #808080; font-style: italic;">/* 10px menos que el sidebar_top por el margen derecho de 10 px */</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span> <span style="color: #933;">10px</span> <span style="color: #933;">0px</span> <span style="color: #933;">0px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span><span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">images/sidebar_bg.png</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">repeat-y</span> <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
	<span style="color: #808080; font-style: italic;">/* Superponemos la sidebar al elemento inicial flotado */</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar_right</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">float</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">right</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">50</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #808080; font-style: italic;">/* Superponemos las listas a su padre sidebar */</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-80px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#sidebar_left</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;"><span style="color: #cc66cc;">100</span>%</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding-left</span><span style="color: #00AA00;">:</span><span style="color: #933;">30px</span><span style="color: #00AA00;">;</span>
	<span style="color: #808080; font-style: italic;">/* Superponemos las listas a su padre sidebar */</span>
	<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span><span style="color: #933;">-80px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">3</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></td></tr></table></div>

<h5>Conclusiones:</h5>
<p>Lo que ocurre, imagino, es que I.Exporer va situando en niveles de solapamiento los elementos flotantes en el orden que van generándose y les da prioridad en ese mismo orden, no le importa la posición que se especifica y necesita que le repitamos que tiene posición relativa.</p>
<p>En cierto modo puede ser lógico la forma que tiene IE de ver el &#8220;modelo de cuadro&#8221; y de los elementos flotantes&#8230; aún así, vuelve a ser el único que actúa de esta manera, el resto: Firefox, Mozilla, Netscape, Epiphany (vale, todos son Geckko ^^), Konqueror, Opera&#8230; no, porque aceptan los estándares.<br />
Microsoft ha cambiado mucho desde que apareció Firefox, y no niego que hayan intentado adaptarse como han podido pero nunca, me temo, lo han considerado seriamente hasta IE7, o lo que es lo mismo, hasta que lo han necesitado urgentemente.</p>
<p>Ha pasado dos veces hasta la fecha y en ambas ocasiones para dar un golpe a la competencia:</p>
<ul>
<li>Con <strong>IE4</strong> para luchar <strong>contra Netscape</strong> en la <a href="http://es.wikipedia.org/wiki/Guerra_de_navegadores">Guerra de los Navegadores</a>.</li>
<li>Con <strong>IE7</strong> para luchar <strong>contra Firefox</strong>.</li>
</ul>
<p>Ya me he relajao :D</p>
<h4>Review:</h4>
<p>Después de ese diseño, el sitio sufrió varios más aunque usa la versión de lo comentado en esta entrada.</p>
<p>Evidentemente había muchas cosas que no sabía, no recordaba o pasé por alto cosas como la <strong><a href="http://blog.culturadigital.org/desarrollo-web/ie6windows-errores-por-conmutacion-y-definicion-de-doctype">conmutación de DOCTYPE</a></strong> por parte de IE6 en relación a la especificación XML de un documento XHTML&#8230; esto es: básicamente, si declaras tu documento como XML IE6 activa automáticamente el modo &#8220;quirks&#8221; de compatibilidad inversa.<br />
Es decir: su modelo de cuadro será el antiguo por ejemplo y otra serie de comportamientos que intentan mitigar los fallos de navegadores antiguos (ej. IE5), o sea, que es casi una odisea saber como I.E. interpretará el código.</p>
<p>Algunos hacks para los flotantes en IE6, por ejemplo la propiedad display:inline; en flotantes para forzar a I.E. el flotado ^^ &#8230;y otras cosillas que ya pondré otro día por ahí.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.culturadigital.org/tecnologia/desarrollo-web/z-index-para-internet-explorer/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
