Parsed Twice
03-23-2007, 12:45 PM
Wow! I finally figured out why I had some unwanted padding in a row of table cells I was working on ... on a whim I changed doctype and the mystery (and very, very annoying) padding was gone! This was after some time involved with troubleshooting both the html and css!
This was also only in Firefox and Opera which made it even more surprising!
Examples below:
Bottom padding added to the cells containing the weather images - this is with a xhtml strict doctype:
http://www.dreamscraps.com/tdpadstrict.html
Transitional doctype - no bottom padding in cells containing the weather images
http://www.dreamscraps.com/tdpadtrans.html
If you view in IE (only tested with IE6) you will see no difference.
Okay - my questions are:
Why?? This must be a bug considering that the table is unstyled (only border added to illustrate the effect) - there should be no problem rendering a normal table in any doctype or with any browser. True or false? Anyone actually know what the browser is thinking with the strict doctype to add that padding?
How?? I would really hate to ditch the strict doctype in order to simply render a normal table. Is there a way to fix this bug? I tried a few css values but nothing has been effective in eliminating the rogue padding so far.
Thanks for taking a look
PT
This was also only in Firefox and Opera which made it even more surprising!
Examples below:
Bottom padding added to the cells containing the weather images - this is with a xhtml strict doctype:
http://www.dreamscraps.com/tdpadstrict.html
Transitional doctype - no bottom padding in cells containing the weather images
http://www.dreamscraps.com/tdpadtrans.html
If you view in IE (only tested with IE6) you will see no difference.
Okay - my questions are:
Why?? This must be a bug considering that the table is unstyled (only border added to illustrate the effect) - there should be no problem rendering a normal table in any doctype or with any browser. True or false? Anyone actually know what the browser is thinking with the strict doctype to add that padding?
How?? I would really hate to ditch the strict doctype in order to simply render a normal table. Is there a way to fix this bug? I tried a few css values but nothing has been effective in eliminating the rogue padding so far.
Thanks for taking a look
PT