Welcome, Guest!

  • Welcome to the new FraggedNation.com!
  • Need help? Click Here!
  • Check out the latest Gamer News
  • New features added daily!
FraggedNation Home

Blogs

SwitchMember Rating: Godmode


Public RSS FeedShare this page!

Internet Explorer Empty Cell Bug

Posted: Wed, Dec 17 2008 at 03:07pm
Switch Blog

Just 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!

There are 69 members logged in, and 769 guest(s).
[Global Directors], [Platform Directors], [Game Directors], [Head Admins], [Referees], [Community Staff], [News Team

Spd-kills°, rhekk6, onyxtacular, Problem?Member Rating: Respectable, hunkka1°, DeadFire87, King MetriMember Rating: Credible°, xRackse°, CorprinusMember Rating: Credible°, KriXus__°, gt7570bMember Rating: Credible°, roadrunnerspeed°, MMKMatthews°, RTFallen, corwin105100°, LIKE_THE_BOMB°, chrisper19°, joaorosario17...Show All 69 Online Members

There are 78,191 accounts registered, and 14,760 teams competing on all 1,173 Ladders, and 635 Tournaments.

FraggedNation has had 65,418,541 hits since 09-15-2003. 57,622 hits today, and 206,821 hits yesterday.Page Rendered in 0.0825(s)

© 2011 Nation Fusion, Inc. All Rights Reserved. Website engine's code is © copyright by FraggedNation.com and Nation Fusion, Inc.
FraggedNation.com is powered by Proteus v3.2 © 2008 by Mainstay Technologies
Privacy Policy, Terms of Service