Welcome to WebmasterWorld Guest from 54.226.194.180

Forum Moderators: incrediBILL

Message Too Old, No Replies

DOCTYPE and W3C problems

looks like crap!

     

digitsix

8:38 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



Ok, I am trying to make my site w3c valid however, it is requiring me to put this doctype line in my header:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">

When I do this, it seems to have no visual effect in IE6, however when viewed in mozilla based browsers, (i tested in firefox), it completely looked like crap, its almost like it was defaulting the cellspacing to 5 or 6 pixels. I also tried different HTML versions with no luck.

I will post the urls to the page with it and the page with out it so you can see what I'm talking about, but I need to know if thats allowed here before I do...

Anyone know what i need to do?

Thanks,
Rick

photon

8:51 pm on Apr 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your DOCTYPE just needs a little tweaking. Get rid of the "Strict", and add the full path:

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

webboy1

3:57 pm on Apr 14, 2004 (gmt 0)

10+ Year Member



Using "Strict" is exactly that. I recently made one of our site W3C valid, but felt that the strict version was just a litte to strict for what we needed.

We used the transitional tag, which looked like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

We never had any problems with it, and the page is valid.

Hope this is of some help.
Webboy

grahamstewart

7:26 pm on Apr 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Likewise the correct doctype for transitional is actually..

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

Using the "short" version puts IE6 (and some other browsers) into quirks-mode where they simulate old browser bugs (like the broken box model from IE5.*)

Always use a FULL doctype to ensure your document is rendered in 'standards compliant' mode.

See:
w3c list of valid doctypes [w3.org]
Microsoft on the doctype switch in IE6 [msdn.microsoft.com]

WipMaster

10:07 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



My doctype :

<?xml version="1.0" encoding="windows-1250"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

the page is perfectly runs with IE ,but with Netscape its fall apart, what cause this problem?

ergophobe

10:10 pm on Apr 21, 2004 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Wipmaster,

What falls apart?

The <?xml> declaration is probably not advisable. It is not required by the recommendations and it forces IE into quirks mode. If you design in IE using CSS and then look in another browser, things may indeed go all crazy.

BTW, I assume you mean Netscape 7.x and not 4.x. If the latter, then IE is running in quirks and NS is running is extreme quirks mode.

WipMaster

10:16 pm on Apr 21, 2004 (gmt 0)

10+ Year Member



i del the :

<?xml version="1.0" encoding="windows-1250"?>

line
but nothing happens :\

netscape ver terrible :(((

ergophobe

1:58 pm on Apr 22, 2004 (gmt 0)

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month




its almost like it was defaulting the cellspacing to 5 or 6 pixels. I also tried different HTML versions with no luck.

Keep in mind, there is no standard for spacing (padding and margins). Each user agent is free to interpret as it wishes. Have you tried specifically setting border, margins, padding with CSS for all elements involved?

One thing that can help sort things out is to apply background colors so you can see who's really upsetting things.

Tom

blackhole

12:33 am on Apr 23, 2004 (gmt 0)

10+ Year Member



Advise:

When you creating a website, it can be a good thing to check itīs performance in both IE, NN and Opera allready from the very beginng. When a problem appears, you can fix it immidiately and understand whatīs going on, instead of building up a huge amount of small problems you canīt survey.

Regards
Blackhole

afficionado

12:47 am on May 12, 2004 (gmt 0)

10+ Year Member



black hole, that's exactly what i do (nn, opera, ie) usually just ie and nn while coding and then testopera for a final checking later on.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month