That's quite a pile of presents for any family to wake up to. Believe it or not, those presents were stacked, using an HTML table! There are more cells than presents in this table, tho. See if you can figure out how many. You may have to put the codes on a testbed or webpage to play with it.
I could leave you in suspense for a month. But that wouldn't be nice of me, would it?
Sooo, let's get down to the analysis. The codes for c/c/p.
- The top row contains 15 cells that have a width of 30, but no height. This sets the width of the whole table at 450.
- The next little surprise: each row tag contains the attribute align="center"
- Each row contains less than 15 cells.
- The first cell in each row is a colspan cell.
- If we add up the widths of the spanned cells and the widths of the single cells, the total is less than 450!
Doesn't make much sense right now, does it? I'd ALWAYS thought the widths of the cells in each row (including those spanned with colspan) HAD to add up to the total width of the first (top) row. I've messed up many a table when the numbers and widths of cells didn't add up right.
Thanks to Golf's and Jromy's insights, they cleared up some confusion in my mind over this. It doesn't matter how many fewer cells there are in the lower rows, nor that the widths don't total up right. All we need is to make sure we add the attribute align="center" to each <tr>!
Note: Apparently some MSN TV update versions do not need to add that attribute to make the cells in each row center themselves. So test this out. BUT, computer browsers DO need that align="center" in the row tags, because I found a similar table on a computer owner's page!
OK, folks, this makes for some interesting variations we can do with table art! The only limits are our imaginations.
|