开发者

Are table cellspacing and cellpadding always 0 (EVEN IF EXPLICTILY SET) if in strict mode?

I have a page I'm converting from quirks mode to strict mode. I 开发者_JAVA技巧added this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"    
"http://www.w3.org/TR/html4/DTD/strict.dtd">

All of a sudden all my tables collapsed that use cellpadding and cellspacing. The page looks fine in IE7 but has collapsed in Firefox. Is this expected?

By using strict mode, even if I set cellpadding=10 it will render as 0? (no padding)?

Do I need to convert all the table cells to divs?


Did you write "cellpadding=10" or "cellpadding=10px" ?


That's not something that should happen generally. Might there be some markup that's getting interpreted differently? Did you try validating the HTML?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜