At 09:10 PM 6/17/2005, David Marr wrote:
Question about the Doctype needing to be on line 1 in the source..
With ASP, it is standard practice to set your @Language directive at
the top of the page. I believe this causes an empty line to be written
in the source. Since that is the first thing I usually do in a page,
will that still affect IE's Doctype switching?
On 6/13/05, Kelly Miller <[EMAIL PROTECTED]> wrote:
> If you put ANYTHING before the Doctype, IE6 will shift to quirks mode
> (page authors complain to Microsoft about this because the XML prolog,
> which is SUPPOSED to be first in XHTML, will put IE6 in quirks mode).
As a general policy of maintaining control over my output pages, I avoid
blank lines and other whitespace before the DOCTYPE tag by coding like this:
<% @Language="VBScript" %><DOCTYPE ...
<% Option Explicit %><DOCTYPE ...
<!-- #INCLUDE FILE="initialize.asp" --><DOCTYPE ...
<?php include("initialize.php") ?><DOCTYPE ...
Note that the PHP "heredoc" format does not output the carriage return
before the HTML content, so as long as you begin the content on the second
line of the heredoc structure you're OK:
echo <<<HTMLHEAD
<!DOCTYPE ...
Paul
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/