![]() |
Website Workshop: HTML |
|
Display: Get the Look You Want 1) Single-pixel GIFs Why am I bringing this up? Because I corrected hundreds of empty table cells in V6. Not only empty, but sometimes even missing closing tags. The reason that these were put in is because the developer wanted to create some space in the display, a line break, some whitespace, whatever. But you can't leave a table cell empty! So I'll show you what to do minimally to avoid this, and then I'll show you what you CAN do if you like with this versatile tool. As I said above, table cells should never be left empty. At minimum, they should be filled with a non-breaking space. Ideally, they should be filled with a clear single-pixel GIF with the desired height and width specified. Insert this image with whatever size space you want to appear on the page in all browsers and operating systems. Using single-pixel clear gifs helps enormously in producing a consistently formatted page that looks the same for all users. If left empty (or even sometimes when filled with a non-breaking space) table cells can have unpredictable heights and widths. For example, if you use a non-breaking space to fill an empty table cell in order to provide spacing between rows on a page, you will most often get a larger space than you really want, perhaps a space of 20 pixels or more. If, on the other hand, you use a single-pixel GIF with height="5" to fill that same table cell, then you will actually get a space of 5 pixels in that row, not more and not less. For consistent results across browsers and platforms, use a single-pixel GIF to fill table cells.
Back to Homepage
|
|||||||||||||||||||||||||||||||||||||||||||||||