Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Table Gap (extra spacing/padding)

12:03 am on Jan 4, 2011 (gmt 0)

New User

5+ Year Member

joined:Jan 4, 2011
posts: 4
votes: 0

I recently changed my doctype from:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

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

as IE wasn't centering my tables using CSS with the previous doctype.
It works now, however, for some reason which I can't figure out for the life of me, now all my tables are 3-pixels taller from the bottom in all browsers.

Here is a before:

And after:

Notice how my top_menu_bar is an extra 3-pixels fatter from the bottom. Because of the doctype change I believe the cause might be that I'm using some depreciated values. Please help, what do I need to add or change to my CSS to remove that gap?
1:27 pm on Jan 6, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
votes: 0

By adding an url to the doctype, you are triggering Standards Mode. Without the url, the page will normally be rendered in Quirks Mode. The critical difference is the "box model". In Quirks Mode, the height/width of an object includes the margins but in Standards Mode the height and width exclude the margins.