<?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>RLM &#187; ie bugs</title>
	<atom:link href="http://www.rlmseo.com/blog/tag/ie-bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rlmseo.com</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 03:37:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Overflow: Auto problem / bug in IE</title>
		<link>http://www.rlmseo.com/blog/overflow-auto-problem-bug-in-ie/</link>
		<comments>http://www.rlmseo.com/blog/overflow-auto-problem-bug-in-ie/#comments</comments>
		<pubDate>Sun, 17 May 2009 02:21:22 +0000</pubDate>
		<dc:creator>jcrens8392</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ie bugs]]></category>

		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=753</guid>
		<description><![CDATA[In this article I explain how to compensate for another one of Internet Explorer's quirks, the way it handles the overflow property. Specifically with regard to the overflow property being set to auto. The fix is pretty simple.]]></description>
			<content:encoded><![CDATA[<p>Another quick bug fix for you. Another little quirk about Internet Explorer is the way in renders the overflow property. I&#8217;ve found two problems with this. First is that without a specified width, IE treats the overflow property, no matter how it&#8217;s set, as overflow: visible; Second, even after we&#8217;ve solved that problem, IE tends to cut off the bottom portion of the element if there is a scroll bar, as if it wasn&#8217;t taking the height of the scroll bar into account in its rendering, so let&#8217;s dive into these real quick.</p>
<p>First of all, if a width is not specified for the given element, IE will treat it like overflow: visible; causing the element to continue outside of where you want it, like this:</p>
<div id="attachment_1320" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug.jpg" rel="wp-prettyPhoto[753]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug.jpg" alt="Internet Explorer Overflow Bug" title="Internet Explorer Overflow Bug" width="450" height="164" class="size-full wp-image-1320" /></a><p class="wp-caption-text">IE Overflow Bug</p></div>
<p>In order to fix this you need to create a stylesheet just for IE (That&#8217;s explained in the last half of this article if you don&#8217;t know how to do that). Once you&#8217;ve done that, add the following styles to the IE-only stylesheet, where &#8220;.element&#8221; is the class of the element you&#8217;re working with:</p>
<pre>.element { overflow-y: auto; overflow-x: visible; width: 450px; }</pre>
<p>IE understands overflow-y and overflow-x, and the width is whatever width you want the element to be and it must be set to prevent this problem. In my case, I wanted the element to be as wide as the containing element, which was 450px.</p>
<p>Once you do this, you&#8217;ll notice this problem:</p>
<div id="attachment_1322" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug-scrollbars.jpg" rel="wp-prettyPhoto[753]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug-scrollbars.jpg" alt="Internet Explorer Overflow Bug Scrollbar Issue" title="Internet Explorer Overflow Bug Scrollbar Issue" width="450" height="76" class="size-full wp-image-1322" /></a><p class="wp-caption-text">Now the bottom line of text is hidden by the horizontal scrollbar</p></div>
<p>Ok, IE, you&#8217;ve really outdone yourself on stupidity this time. It looks like IE is not taking the scroll bar into account in the height of the element. So, now we need to fix that by adding padding-bottom: 20px; to the IE-only stylesheet, and here&#8217;s what we get:</p>
<pre>.element { overflow-y: auto; overflow-x: visible; width: 450px; padding-bottom: 20px; }</pre>
<div id="attachment_1323" class="wp-caption aligncenter" style="width: 460px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug-fixed.jpg" rel="wp-prettyPhoto[753]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-overflow-bug-fixed.jpg" alt="Internet Explorer Overflow Bug Fixed" title="Internet Explorer Overflow Bug Fixed" width="450" height="98" class="size-full wp-image-1323" /></a><p class="wp-caption-text">Final result is much better</p></div>
<p>Voila! Problem solved. Keep in mind, this isn&#8217;t a perfect solution&#8230;the problem with this is that IE will add that 20px padding at the bottom of the element even if there isn&#8217;t a scroll bar, leaving you with some extra space on the bottom of your element in this case. One day soon, hopefully all browsers will render pages in the same way; until then, solutions like these will have to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlmseo.com/blog/overflow-auto-problem-bug-in-ie/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IE List Item Margin Hack</title>
		<link>http://www.rlmseo.com/blog/ie-list-item-margin-hack-css/</link>
		<comments>http://www.rlmseo.com/blog/ie-list-item-margin-hack-css/#comments</comments>
		<pubDate>Sat, 16 May 2009 02:27:09 +0000</pubDate>
		<dc:creator>jcrens8392</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[ie bugs]]></category>

		<guid isPermaLink="false">http://www.rlmseo.com/blog/?p=765</guid>
		<description><![CDATA[As any front-end web developer knows, getting IE to play nice with certain layouts can require a bit of hacking and bug fixing. In this article I explain a list item margin bug that causes list elements to be spaced much too far apart in Internet Explorer 6 and how to fix it.]]></description>
			<content:encoded><![CDATA[<p>As a web designer you learn something new everyday about the intricacies of Internet Explorer&#8217;s faulty rendering of certain elements on a screen. While I&#8217;m not always a proponent of using  a <strong><em>Strict Doctype</em></strong>, it does help solve some of those issues&#8230;then again, it also requires a bit more work and time is money, right? Well, one of the problems I&#8217;ve had with internet explorer in the past is the way it renders lists, unordered and ordered lists, especially IE6. Even with a Strict DOCTYPE declaration, internet explorer has a nasty little habit of adding margin between list items when you&#8217;ve specifically written into the CSS that it shouldn&#8217;t behave this way. I have to admit, I do this everyday and it took me a while to figure this out, so hopefully this will help someone else having margin problems with list items in IE 6 or any other version of internet explorer.</p>
<h2>Internet Explorer List Item Margin Problem</h2>
<p>So what is the problem exactly? Here&#8217;s a snapshot of the sidebar of a site I&#8217;m working on in Firefox:</p>
<div id="attachment_1325" class="wp-caption aligncenter" style="width: 222px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/firefox-sidebar-ok.jpg" rel="wp-prettyPhoto[765]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/firefox-sidebar-ok.jpg" alt="List item margins in Firefox" title="List item margins in Firefox" width="212" height="283" class="size-full wp-image-1325" /></a><p class="wp-caption-text">List item margins render properly in Firefox</p></div>
<p>Incidentally, this is also how it appears in IE 7. Now, the snapshot of how that same unordered list appears in IE 6:</p>
<div id="attachment_1327" class="wp-caption aligncenter" style="width: 221px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-sidebar-bad.jpg" rel="wp-prettyPhoto[765]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-sidebar-bad.jpg" alt="IE list item margins" title="IE list item margins" width="211" height="446" class="size-full wp-image-1327" /></a><p class="wp-caption-text">List item margins render with too much spacing in IE6</p></div>
<p>Whoa! Where did all that extra margin come from?! Well, it certainly didn&#8217;t come from the CSS because every single other browser tested displays fine and all the margins are set to 0px, as well as padding. So what&#8217;s the problem here?</p>
<h2>IE Problem with List Items and Display: Block</h2>
<p>The problem rears its ugly head, in this situation, because I have the <em><strong>display property</strong></em> of those list items set to <em><strong>block </strong></em>in the stylesheet. Internet Explorer, but especially version 6, just freaks out when trying to display lists when the links within those lists are styled display: block. So, how do we fix it? We need to trick internet explorer (because its bugginess also allows us to trick it into behaving the way we want) into thinking that the <em><strong>display</strong></em> property is set to <em><strong>inline</strong></em>, after we&#8217;ve done that we can essentially tell it we&#8217;ve changed our mind and we want the <em><strong>display</strong></em> property set to <em><strong>block</strong></em>. This will make IE really throw a temper tantrum, but it&#8217;s exactly the temper tantrum we want it to throw.</p>
<h2>Conditional Comment Styles</h2>
<p>To solve this we need to add a conditional comment in our header section, preferably near our other stylesheet declarations. This conditional comment is something only IE will read because Microsoft realized their browser was so buggy there had to be a way to give instructions specifically to IE without that instruction being interpreted by other browsers:</p>
<pre>&lt;!--[if IE]&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;http://yourdomain.com/styles/ie.css&quot;  /&gt;
&lt;![endif]-&gt;</pre>
<p>Now you need to create a new stylesheet for Internet Explorer only and call it ie.css.</p>
<p>Once you&#8217;ve done that add these two lines to the stylesheet:</p>
<pre>#sidebar li a{display:inline-block !important;}
#sidebar li a {display:block !important;}</pre>
<p>The &#8220;#sidebar&#8221; part is part of my stylesheet because the sidebars on that particular site are wrapped in a &lt;div id=&#8221;sidebar&#8221;&gt;&lt;/div&gt;. When dealing with IE it&#8217;s always best to be as specific as possible. Also, you&#8217;ll notice I&#8217;ve added the <em><strong>!important</strong></em> declaration to this. The purpose of that is to ensure that when I change some styles later on IE doesn&#8217;t go and try to ignore this rule. Generally, IE will adopt the most specific style, so, if I were to add the following line to my general stylesheet:</p>
<pre>#sidebar ul li a{display: block; }</pre>
<p>IE may try to ignore the hack above in the ie.css file. Why? Because this second declaration is more specific. The <em><strong>!important</strong></em> declaration prevents that.</p>
<p>So, now that we&#8217;ve added those two lines to ie.css, what does IE 6 show us?</p>
<div id="attachment_1328" class="wp-caption aligncenter" style="width: 222px"><a href="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-sidebar-fixed.jpg" rel="wp-prettyPhoto[765]"><img src="http://www.rlmseo.com/wp-content/uploads/2009/05/ie-sidebar-fixed.jpg" alt="IE List Item Margins Fixed" title="IE List Item Margins Fixed" width="212" height="283" class="size-full wp-image-1328" /></a><p class="wp-caption-text">Final result - Renders properly in IE6</p></div>
<p>And there you have it, it took a bit of trickery to get that rendered properly in IE6, but it wasn&#8217;t all that difficult now was it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rlmseo.com/blog/ie-list-item-margin-hack-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

