
Internet Explorer Empty Cell Bug
Posted: Wed, Dec 17 2008 at 03:07pmJust thought I'd post a quick blog about an epiphany I had... For a long time now, I've been aggravated by the IE rendering engine (for many things) and it's inability to understand the empty-cells CSS directive to display and style empty table cells.
This has proved less important over the years since tables have been virtually eliminated from properly coded webistes, however it's important to note that there IS a time and a place for table drawn data. When this is the case, it can be a difficult prospect to perfect your layout when IE insists on not styling empty cells. It's downright foolish.
Well, once again, JQuery to the rescue! I've used Dojo a bit, and perused Yui and some other Javascript frameworks, but thus far JQuery has been the simplest to implement with the least amount of overhead. Case and point you ask? Take this code sample that will quickly and efficiently put content into all of your empty Table Cells, thereby making Internet Explorer (and any other browser that doesn't want to adhere to standards) properly style the cells:
$(document).ready(function() { $("td:empty").html(" "); });
This will put a non-breaking space in any empty Table Cell in the DOM, and then your cells will be properly styled. This will have no effect in other browsers that already understand the empty-cells CSS directive, as it essentially overrides it with non-semantic code; Code that even goes un-noticed by search engines since it's rendered in JavaScript!
Hope this helps someone else along the way!

Assassin Creed Revelations
Assassin's Creed: Brotherhood
Battlefield 3
COD: Black Ops
COD: Modern Warfare 3
Dirt 3
FIFA 12
Forza Motorsport 4
Gears of War 3
Ghost Recon Future Soldier
Halo Reach
Madden NFL 12
Marvel vs Capcom 3
MLB 2K11
Mortal Kombat
NHL 12
Street Fighter x Tekken
Super Street Fighter 4
Tekken 6
Starhawk
Uncharted 3
BF: Bad Company 2
Counter-Strike: Global Offensive
Halo Combat Evolved
League of Legends
Minecraft
Nexuiz
Quake III
Quake Live
StarCraft II
Team Fortress 2
Tribes Ascend
Unreal Tournament 99
FEAR 3
Homefront
Mario Kart


°