Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Help with DOCTYPE (http://www.velocityreviews.com/forums/t162623-help-with-doctype.html)

Saggy 08-31-2005 06:29 PM

Help with DOCTYPE
 
I have designed a webpage that starts with <html> and looks OK....
however I think I want to put a DOCTYPE tag in front of it (a spider
simulator told me to).... and when the DOCTYPE tag includes the
following ..

"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"

my website is messed up, in particular, a table I positioned using

style="position:absolute; left: 10; top:65"

now is not positioned correctly. What is going on? Do I need that
line in the DOCTYPE tag, if so, how to get the table in the right
place??????


WD10 08-31-2005 08:03 PM

Re: Help with DOCTYPE
 
On Wed, 31 Aug 2005 11:29:35 -0700, Saggy wrote:

> I have designed a webpage that starts with <html> and looks OK....
> however I think I want to put a DOCTYPE tag in front of it (a spider
> simulator told me to).... and when the DOCTYPE tag includes the
> following ..
>
> "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"
>
> my website is messed up, in particular, a table I positioned using
>
> style="position:absolute; left: 10; top:65"
>
> now is not positioned correctly. What is going on? Do I need that
> line in the DOCTYPE tag, if so, how to get the table in the right
> place??????


Are you using Internet Explorer? If you use something like

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

it switches on "standards compliant mode".

If you just use something like

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

you will be in "quirks mode".

A list of DOCTYPES is here:
http://www.w3.org/QA/2002/04/valid-dtd-list.html

This page is about XHTML, but explains standards compliant and quirks
modes:
http://www.w3.org/International/arti...-xhtml/#quirks

Saggy 08-31-2005 08:13 PM

Re: Help with DOCTYPE
 
The same thing happens with EXPLORER or MOZILLA browers..... when I
include

"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"


in the DOCTYPE the absolute positioning doesn't work. So, apparently
I'm switching from QUIRKS mode to STANDARDS mode, and what worked in
QUIRKS mode no longer works in STANDARDS mode. Why is that... the
absolute positioning doesn't seem to work at all in STANDARDS mode...


Mitja Trampus 08-31-2005 08:27 PM

Re: Help with DOCTYPE
 
Saggy wrote:
> So, apparently
> I'm switching from QUIRKS mode to STANDARDS mode, and what worked in
> QUIRKS mode no longer works in STANDARDS mode. Why is that... the
> absolute positioning doesn't seem to work at all in STANDARDS mode...


QUOTE: "my website is messed up, in particular, a table I
positioned using

style="position:absolute; left: 10; top:65""

should be "left:10px; top: 65px". In css, units cannot be
omitted. In quirks mode, browsers tolerate such
non-compliant code, in standards mode, they ignore the whole
rule due to improper syntax which is what standards demand.



Alan J. Flavell 08-31-2005 09:55 PM

Re: Help with DOCTYPE
 

On Wed, 31 Aug 2005, Saggy wrote:

> "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"
>
> my website is messed up, in particular, a table I positioned using
>
> style="position:absolute; left: 10; top:65"
>
> now is not positioned correctly.


You are mistaken. The *correct* treatment of those invalid left and top
specifications is to ignore them. Any browser which does not ignore them
is violating a mandatory requirement of the CSS specification, and as such
has ruled itself out as a www-compatible browser.

http://www.w3.org/TR/CSS21/syndata.html#parsing-errors

This may not be what you want, but it -is- what you were asking for.

> What is going on?


The solution is to ask for what you want, instead of asking for one thing
and wanting something different.

You may find the W3C CSS checker will help you.


Saggy 08-31-2005 10:34 PM

Re: Help with DOCTYPE
 
As Austin Powers would say .... "Yeah baby" ......

Works like a charm.

Thanks



All times are GMT. The time now is 01:25 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.