Help with DOCTYPE

S

Saggy

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??????
 
W

WD10

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/articles/serving-xhtml/#quirks
 
S

Saggy

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...
 
M

Mitja Trampus

Saggy said:
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.
 
A

Alan J. Flavell

"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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top