<?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>Ten Tonne Baby &#187; bugs</title>
	<atom:link href="http://www.tentonnebaby.com/tag/bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tentonnebaby.com</link>
	<description>Discussion on Web Technologies, Design and London</description>
	<lastBuildDate>Thu, 19 Jan 2012 09:33:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HasLayout in IE7</title>
		<link>http://www.tentonnebaby.com/2006/10/04/haslayout-in-ie7/</link>
		<comments>http://www.tentonnebaby.com/2006/10/04/haslayout-in-ie7/#comments</comments>
		<pubDate>Wed, 04 Oct 2006 11:55:25 +0000</pubDate>
		<dc:creator>Oli</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.embeddedstream.com/2006/10/04/haslayout-in-ie7/</guid>
		<description><![CDATA[The majority of freaky rendering behaviour in IE6 came down to whether the haslayout attribute was applied to an element. This was a speed optimisation in the rendering engine &#8211; certain behaviour was skipped when deciding how to render an element if haslayout was false to increase the efficiency of rendering a page. The result [...]]]></description>
			<content:encoded><![CDATA[<p>The majority of freaky rendering behaviour in IE6 came down to whether the <a href="http://www.satzansatz.de/cssd/onhavinglayout.html">haslayout</a> attribute was applied to an element. This was a speed optimisation in the rendering engine &#8211; certain behaviour was skipped when deciding how to render an element if haslayout was false to increase the efficiency of rendering a page. The result was that a valid set of <acronym title="Cascading Style Sheets">CSS</acronym> instructions would produce unexpected rendering behaviour in IE6 unless haslayout was true on certain elements.</p>
<p>One of the hacks used to get around this was to apply height: 1px to an element (in a hacks file, served only to IE6 via conditional comments). As IE6 treated height like min-height, this would have no adverse behaviour, but would result in haslayout resolving to true for the element.</p>
<p>This morning I came across my first strange rendering issue in IE7 due to haslayout being false on a container element. I think a lot of the quirks have been fixed, but just be aware that the engine can still render differently according to haslayout. The previous height:1px fix is no longer applicable, as IE7 quite correctly respects any absolute height that you specify.</p>
<p>The fix in this case was to set min-height: 1px, which is another attribute that will now result in haslayout being set. In our case this had no adverse effect on the desired rendering, and therefore was a suitable fix. The actual problem was minor &#8211; 1px of extra padding on an element for no good reason.</p>
<p>I think in a lot of cases setting a min-height value would be a good approach (obviously this can be abstracted to a seperate file and served with conditional comments). However this is a fairly unobtrusive fix, so could stay with the core set of instructions without polluting the water too much.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tentonnebaby.com/2006/10/04/haslayout-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Think Before You Hack</title>
		<link>http://www.tentonnebaby.com/2006/10/03/think-before-you-hack/</link>
		<comments>http://www.tentonnebaby.com/2006/10/03/think-before-you-hack/#comments</comments>
		<pubDate>Tue, 03 Oct 2006 10:02:38 +0000</pubDate>
		<dc:creator>Oli</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[rendering]]></category>

		<guid isPermaLink="false">http://www.embeddedstream.com/2006/10/03/think-before-you-hack/</guid>
		<description><![CDATA[I've just been looking at a 'broken' site in IE7 and helping a friend diagnose what the problems are. I think people tend to assume that if a site renders happily in a bunch of different browsers, but has problems in IE7, then the browser is bad...]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been looking at a &#8216;broken&#8217; site in <acronym title="Internet Explorer 7">IE7</acronym> and helping a friend diagnose what the problems are. I think people tend to assume that if a site renders happily in a bunch of different browsers, but has problems in IE7, then the browser is bad. The default response is then to add some hacks to make IE7 work correctly.</p>
<p>This is a bad way to go. Each problem that I&#8217;ve looked at so far, IE7 is actually rendering correctly based on the instructions it understands. We just fixed a big layout problem where the root cause was a container div not stretching to contain it&#8217;s floated children. However this was the correct behaviour. Based on the instructions that IE7 had parsed and understood, it was rendering correctly.</p>
<p>The fact that those instructions didn&#8217;t arrive at the desired layout was the problem, not the browser rendering. By taking the time to diagnose the problem and understand why it was rendering in a certain way, you can solve the root issue rather than adding a new layer of hacks on top of broken instructions.</p>
<p>Generally IE7 will behave in a very logical way &#8211; it&#8217;s really worth taking the time to figure out why something looks wrong, rather than jumping straight in and hacking.</p>
<p>UPDATE: the particular issue we were looking at was how to get an element to contain it&#8217;s floated children. This has been discussed already on <a title="Clearing floats in IE7" href="http://www.456bereastreet.com/archive/200603/new_clearing_method_needed_for_ie7/">456 Berea Street</a> and <a title="Clearing floats in IE7" href="http://www.stuffandnonsense.co.uk/archives/clearing_floats_without_structural_markup_in_ie7.html">Malarky.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tentonnebaby.com/2006/10/03/think-before-you-hack/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

