|
Posted by Jonathan N. Little on 02/20/07 19:32
Nick Wedd wrote:
> At http://www.files.maproom.org/00/18/present.php?m=0004 you can see a
> page which looks as I want it to. It validates (using the validator at
> http://validator.w3.org/), except that it is missing a doctype tag.
>
> So I have added the line
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> as recommended at
> http://validator.w3.org/docs/help.html#faq-doctype, giving the page
> http://www.files.maproom.org/00/18/presentrh.php?m=0004. This page is
> identical to the other one apart from the addition of the doctype tag.
> It validates perfectly, but looks wrong - the vertical spacing in the
> table near the top is wrong.
>
> I have tried other doctype tags, with the same, or worse, results. How
> should I set about creating a page which looks right _and_ passes the
> validator?
Try:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
And if you want to remove the space above your 'topbar' table then
remove the default margin from the top of your document
BODY { margin-top: 0; }
If you want to remove all space, then BODY { margin: 0; padding: 0; }
You know this isn't valid
<p><table class="pai"><tbody><tr>
....
</p>
TABLE is a block element as is P, but P can *only* contain inline
elements. If you want a space above the TABLE then style it with a margin!
TABLE.pai { margin-top: 1.5em; }
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|