🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

HTML minutae part N

Published July 19, 2006
Advertisement
Ahh yes, it's now part 103 of "The HTML minutae minute", chronicling little bits of HTML that appear nowhere in books that claim to be the "definitive guide" to HTML but apparently are well short of that.

This time it's what to do to make your table bits appear in the right place. In the past, you were told to put a non-breaking space into any empty table cells so that they'd get rendered, because the default HTML table-renderer doesn't have to draw empty table cells.

Well that's all well and good if your table cells are of reasonable size. Many of my tables, however, consist of little 13x13 corner bits, and if the font that your browser chooses to use had a non-breaking space taller than that, your table will have little spaces in it, thus making your tables look uglier than burned mud.

Then you were told to use a slightly better, but no less kludgy method of putting in a 1x1 pixel transparent GIF file into that cell. It'd still get the cell to render, but you wouldn't have to deal with stretchy-font issues.

Finally, you were given the PROPER SOLUTION, which is to put:

table { empty-cells:show; }

into your stylesheet CSS. This is a suggestion to the HTML renderer that it not try to be such a smarty-pants and that it should draw every friggin' cell its given no matter how much it wants to ignore it.

That has been your HTML minutae minute. Go in peace.
0 likes 1 comments

Comments

Jesse Chounard
What are you using the tables for? If your extra empty cells are because you're using tables for positioning, I'd recommend that you use divs (and accompanying css) instead.

Of course, if you're using tables to organize collections of data, then nevermind, and thanks for the info. :)
July 19, 2006 04:42 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement