<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Keith's Web Blog RSS Feed</title>
<language>en-us</language>
<link>http://www.keithwatanabe.net/index.php</link>
<description>Keith Watanabe's Website</description>
<item>
<title>Internet Explorer Bug Fix For Margins, Floats and Disappearing Backgrounds</title>
<link>http://www.keithwatanabe.net/blogs/2008/3/8/4c8ad283df73bbd43b8be5c133f766a9.html</link>
<description><![CDATA[One of my fears about Yahoo losing the shareholder battle to M$ is that MSIE will become even more dominant, despite the fact that it's a crappy browser and hard to program (well at least for a linux dude like myself :p).  But the main thing I want to share is a few tips on some of the horrible excursions I dealt with in MSIE:<br />
<br />
Float and the Double Margin Bug<br />
<br />
Apparently, MSIE suffers from a nasty little bug where if you float an element and provide a margin, MSIE will double the size of the margin either left or right.  To counter it, you need to add:<br />
<br />
display: inline (or block)<br />
<br />
for your class that you're employing the float.  There's a lot of resources on the web for why this occurs as well as more details on this.<br />
<br />
Next, there's another annoying bug that I encountered and spent hours knocking my head against my table (okay, not literally).  It's where backgrounds disappear if you have numerous div tags and use the background-color attribute.  The quick fix is to trick MSIE into redrawing the section, so you add a height attribute of say 1%.  The code would look like this:<br />
<br />
height: 1%;<br />
<br />
Put that in the class that has the background-color attribute and these should disappear.]]></description>
<pubDate>Sat, 08 Mar 2008 11:20:02 -0700</pubDate>
<guid>http://www.keithwatanabe.net/blogs/2008/3/8/4c8ad283df73bbd43b8be5c133f766a9.html</guid>
</item>
</channel>
</rss>
