Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 27th, 2004, 06:12 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default doctype 4.01

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

this is ok for all popular browsers except MSIE
for Internet Explorer, i've to truncate http://~ portion, otherwise page distorts.

what is correct?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
or previous?

__________________
`~@#\^%&*/\.<.\/-|+|_!:;..=?>
PHP, SEO | anshul shrivastava | mediasworks.org | FB
Reply With Quote
  #2 (permalink)  
Old December 27th, 2004, 02:52 PM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

anshul, if you don't post your truncated version, we can't know if it's correct or not. Why this need for us to guess all the time?

Anyway, I *guess* that you have stumbled on Quirks contra Standards Rendering Mode.
http://www.hut.fi/u/hsivonen/doctype.html

Maybe what's not correct is your HTML/CSS. But that would be another guess. Hmmmm.


(o<
//\ =^..^=
Reply With Quote
  #3 (permalink)  
Old December 28th, 2004, 06:12 AM
Friend of Wrox
 
Join Date: Mar 2004
Location: Bhopal, MP, India.
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

As I read that url, I (did.) used a dtd url in 4.01 transitional doctype:
Quote:
quote:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
As I wrote, this makes html Web page bad in IE5 plus IE6 ( Why? ). If I truncate url pointing2dtd, i.e., 'http://www.w3.org/TR/html4/loose.dtd' from doctype, page looks fine. Transitional documents having <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ( no dtd url ) are validated OK by W3C html 4.01 validator and most people not use dtd url in doctype. I wanted to do that (atleast for transitional html), but IE (only) forbids me do that. Still, skipping dtd url for html 4.01 transitional documents, makes less sense.
Quote:
quote:http://www.oreillynet.com/pub/a/network/2000/04/14/doctype/index.html?page=2
Reply With Quote
  #4 (permalink)  
Old December 28th, 2004, 06:24 AM
Friend of Wrox
Points: 1,315, Level: 14
Points: 1,315, Level: 14 Points: 1,315, Level: 14 Points: 1,315, Level: 14
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , .
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Probably because something you have in that page happens to render OK when IE is in Quirks Mode but not when it is in Standards Mode.

Another option is that you have stumbled on one of IE6's many bugs. Some of them go away when you force IE to emulate IE5.

If you show the page someone will probably be able to tell you exactly what and why. Without that we can keep guessing till doomsday.

(o<
//\ =^..^=
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Include DOCTYPE declaration Pankaj C XSLT 6 October 18th, 2007 08:46 AM
Copying DOCTYPE madanshah16 XSLT 1 August 18th, 2007 12:23 PM
Form doesn't w3c validate, html 4.01 mps2006 HTML Code Clinic 1 November 26th, 2006 03:41 AM
DOCTYPE for XHTML 1.1 complaince crmpicco HTML Code Clinic 14 July 22nd, 2006 09:24 AM
Why to use <!Doctype...? rupen HTML Code Clinic 2 October 25th, 2005 04:55 AM



All times are GMT -4. The time now is 07:31 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.