


<?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>Repeat Penguin &#187; hasLayout</title>
	<atom:link href="http://www.repeatpenguin.com/tags/haslayout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.repeatpenguin.com</link>
	<description>website design : xhtml : css : mobile web ~ Delivered Repeatedly by Jeremy Anderson</description>
	<lastBuildDate>Sat, 28 Aug 2010 06:41:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Got Layout?</title>
		<link>http://www.repeatpenguin.com/2007/11/26/got-layout/</link>
		<comments>http://www.repeatpenguin.com/2007/11/26/got-layout/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 12:00:16 +0000</pubDate>
		<dc:creator>Jeremy Anderson</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[hasLayout]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.repeatpenguin.com/2007/11/26/got-layout/</guid>
		<description><![CDATA[
* html body {display: none;} &#8230; I haven&#8217;t figured out why some think this hack is discriminatingGeorg



position: relativity
Ever wonder why applying a position: relative to an element in Internet Explorer can fix bizarre rendering problems? The standing theory, which is also a highly technical one, is that sometimes you just need to remind IE that [...]]]></description>
			<content:encoded><![CDATA[<div class="liftout">
<blockquote cite="http://www.gunlaug.no/"><p>* html body {display: none;} &#8230; I haven&#8217;t figured out why some think this hack is discriminating<cite><a href="http://www.gunlaug.no/">Georg</a></cite></p>
</blockquote>
</div>
<p><img src="http://www.repeatpenguin.com/wp-content/uploads/2007/11/gotlayout.jpg" alt="got layout" title="got layout" width="512" height="138" /></p>
<h3>position: <span class="p">relativity</span></h3>
<p>Ever wonder why applying a <span>position: relative</span> to an element in Internet Explorer can fix bizarre rendering problems? The standing theory, which is also a highly technical one, is that sometimes you just need to remind IE that things need to flow in their natural order. As <em>logical</em> as that may sound, the problem really has to do with a little thing called <span><em>hasLayout</em></span>. </p>
<h3>display: <span class="p"><span style="text-decoration: line-through">none</span> inline-block</span></h3>
<p>This is not a new cat, nor a new bag, for that matter. Web designers have long been plagued with the rendering inconsistencies offered up by Internet Explorer, such as the <a href="http://positioniseverything.net/explorer/peekaboo.html">peek-a-boo</a> bug. Each of us, individually and as a community, have mapped these inconsistencies out and made record of them in our own bag of CSS tricks. None-the-less, IE still proves to be the most loathsome part of the job for many.</p>
<p>Though IE7 has made some pleasing improvements over it&#8217;s predecessors, it&#8217;s still a pitch or seven away from being adequate. So, I was very excited when I found <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">On Having Layout</a>, an on going project focussed on understanding IE&#8217;s proprietary &#8220;Layout&#8221; property and how it is messing up <em>our</em> world.</p>
<p class="tr"><span id="more-53"></span></p>
<h3>hasLayout = true</h3>
<p><a href="http://www.satzansatz.de/">Ingo Chao</a>, one of the editors on this project has a background as a clinical physician as well as an editor. The clinical side definitely comes out in this article. It&#8217;s a comprehensive, well articulated study into &#8220;what the hell is going on with IE&#8221;. If you know what CSS is, you should read <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">On Having Layout</a>.</p>
<h3>hasLayout = false</h3>
<p>The concept of &#8220;<a href="http://msdn2.microsoft.com/en-us/library/ms533776.aspx">Layout</a>&#8221; as a property, is something only to be expected from Microsoft. And, as you see by following the link, if you are using Firefox at least, the Microsoft Development Center official resources for this strange little property are anything but laid out well.</p>
<p class="center"><img src="http://www.repeatpenguin.com/img/20071126/ie_development_center.jpg" alt="microsoft development center rendering issues" /><span class="caption">Controlling Presentation with Measurement and Location Properties in Quirks Mode . . . umm?</span></p>
<h3>A Definition of <em>hasLayout</em></h3>
<p>Just as some people have <em>character</em> and others, not so much, according to Internet Explorer, so too do some elements in html have <em>Layout</em> and others, not so much. Because IE applies a seemingly arbitrary discrimination over it&#8217;s elements, we are tasked with stamping out a multitude of rendering bugs, when we write code.</p>
<h4>So what is <span><em>Layout</em></span> and how can I get me some?</h4>
<p class="quoted">&#8220;Layout&#8221; is an IE/Win proprietary concept that determines how elements draw and bound their content, interact with and relate to other elements, and react on and transmit application/user events.<span><a href="http://www.satzansatz.de/cssd/onhavinglayout.html">www.satzansatz.de</a></span></p>
<p><em>Layout</em> is irreversibly triggered by CSS. <em>hasLayout</em> for elements can either be set to <em>true</em> or <em>false</em>. Some elements, such as <span>&lt;html&gt;</span>, <span>&lt;body&gt;</span>, <span>&lt;table&gt;</span> and <span>&lt;img&gt;</span> appear to have <em>Layout</em> by default. While others can be given <em>Layout</em> by applying select CSS properties, such as <span>position: absolute</span>, <span>float: left|right</span> and <span>display: inline-block</span>.</p>
<p>Unlike other proprietary CSS for browsers, there is no <em>layout</em> property to declare and we are forced to interact with it in this very indirect way.</p>
<h3>Spilled Milk</h3>
<p>The <em>hasLayout</em> stumbling block has affected all designers and coders in their attempts to cross-broswer their work, and will continue to do so, to be sure. Its&#8217; unusual nature can upset the rendering of boxes, as well as their children. As indicated in <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">On Having Layout</a>, consequences of an element having, or not having <em>layout</em> can include:</p>
<p class="quoted">
Many common IE float bugs.<br />
Boxes themselves treating basic properties differently.<br />
Margin collapsing between a container and its<br />descendants.<br />
Various problems with the construction of lists.<br />
Differences in the positioning of background images.<br />
Differences between browsers when using scripting.
</p>
<h3>These Bugs We Know</h3>
<p>Anyone who has laid code for the web is well aware of IE rendering bugs.  The work <a href="http://positioniseverything.net/" title="Holly on PIE">Holly Bergevin</a>, <a href="http://www.satzansatz.de/css.html" title="Satzansatz â€” CSS">Ingo Chao</a>, <a href="http://www.brunildo.org/" title="Brunildo â€” CSS">Bruno Fassino</a>, <a href="http://positioniseverything.net/" title="Big John on PIE">John Gallant</a>, <a href="http://www.gunlaug.no/" title="Web-carpenter and farm assistent">Georg SÃ¸rtun</a> and <a href="http://emps.l-c-n.com/" title="Empty Spaces">Philippe Wittenbergh</a> have put into creating this reference text is something every developer can benefit from and it could end up saving <em>you</em> considerable, hair-pulling time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.repeatpenguin.com/2007/11/26/got-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
