Web Hosting Talk







View Full Version : doctype causes padding on tables?


ub3r
04-17-2004, 03:32 PM
Alright, here's my problem.

When viewing the following page on mozilla firebird, on windows xp, on a saturday afternoon, there is a small gap between the header, and the side navigation. You can see this by looking at the following page: http://dev.fsckme.net/oxiserve/index.htm .

When you view it using internet explorer, it looks just fine, absolutely no problems, functions just fine.

BUt, when you view it using mozilla firebird, there is a small gap between the header and the side navigation.


I found that if i comment out the doctype line, which includes the following, that the padding doesn't exist on that line.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Now, i have made 2 different versions of the page, one that includes the doctype line being commented out, and one that includes the doctype being uncommented, and actually doing something.

http://dev.fsckme.net/oxiserve/index.htm - no comments
http://dev.fsckme.net/oxiserve/nodoc.htm - with comments around doctype .

Do any of you have a solution where the doctype line can be uncommented, and there wil be no gap?


Thanks :)


love,
ub3r

stripeyteapot
04-17-2004, 03:35 PM
have you tried adding a style to the table?

<td style="padding-left: 0px; padding-top: 0px; padding-bottom: 0px; padding-right: 0px;">

It may work, cant hurt to try :)

ub3r
04-17-2004, 03:38 PM
i'm already using css, which the style="" attribute uses.

stripeyteapot
04-17-2004, 03:42 PM
Correct me if I'm wrong, but by CSS do you mean you're including a style?

ub3r
04-17-2004, 03:47 PM
yes..........................

stripeyteapot
04-17-2004, 03:50 PM
Right unless you specified it for td in the stylesheet it won't detect it.

If you have, set your body tag to the following

<body margin-left=0 margin-right=0 margin-top=0 margin-bottom=0>

It doesn't seem you have that set.

ub3r
04-17-2004, 04:03 PM
BODY{ margin: 0px;}

my style sheet is located here, it contains all styling attributes.

http://dev.fsckme.net/oxiserve/s/def.css .

stripeyteapot
04-17-2004, 04:06 PM
Where it says Body {style here

Try

Body, TD {style here

ub3r
04-17-2004, 04:17 PM
dude.. stop throwing out guesses. It's obvious you don't know css, or what the problem is.

The problem is not margins on the body tag, is that were the problem there would be a border around the entire page, as you can see the graphics in the header are right along the border of the page, with absolutely no space between the two.

The problem is not the TD element in the style sheet, if you knew how to read source code, you would see that i am using the id="" attribute in my html so that styling attributes are pulled from the style sheet.


i don't want to be rude, but i don't like having to correct people over and over again.

stripeyteapot
04-17-2004, 04:19 PM
Sorry it's hard to figure out with only IE :) Good luck