Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #1220 > unrolled thread

doctype not found?

Started bygeoff@invalid.invalid
First post2011-04-20 08:17 +0100
Last post2011-04-20 12:51 -0400
Articles 15 — 4 participants

Back to article view | Back to comp.lang.php


Contents

  doctype not found? geoff@invalid.invalid - 2011-04-20 08:17 +0100
    Re: doctype not found? Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-20 05:24 -0400
    Re: doctype not found? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2011-04-20 06:40 -0400
    Re: doctype not found? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-04-20 13:00 +0200
      Re: doctype not found? geoff@invalid.invalid - 2011-04-20 13:20 +0100
        Re: doctype not found? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-04-20 14:28 +0200
          Re: doctype not found? geoff@invalid.invalid - 2011-04-20 15:12 +0100
            Re: doctype not found? "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2011-04-20 18:05 +0200
              Re: doctype not found? geoff@invalid.invalid - 2011-04-20 23:10 +0100
                Re: doctype not found? Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-20 23:48 -0400
                  Re: doctype not found? geoff@invalid.invalid - 2011-04-21 06:33 +0100
        Re: doctype not found? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2011-04-20 09:17 -0400
          Re: doctype not found? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2011-04-20 10:49 -0400
            Re: doctype not found? geoff@invalid.invalid - 2011-04-20 16:29 +0100
              Re: doctype not found? "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2011-04-20 12:51 -0400

#1220 — doctype not found?

Fromgeoff@invalid.invalid
Date2011-04-20 08:17 +0100
Subjectdoctype not found?
Message-ID<ht1tq6dd3jdbtc8v2quqgflr11i62vberc@4ax.com>
Hello

Using

http://www.micro-active.com

I find that with IE9 the page is not centred when first visited.
Moving to another page and then back to index.php it is then centred?!

With the latest Firefox, Opera, Chrome and Safari for Windows the page
is centred from the start.

Plus, if I do a W3C HTML check I see that the doctype is not known. If
I remove the php at the top of the file then no errors found, so, what
is wrong with the php?

Thanks

Geoff

[toc] | [next] | [standalone]


#1223

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-04-20 05:24 -0400
Message-ID<iom8on$jni$1@dont-email.me>
In reply to#1220
On 4/20/2011 3:17 AM, geoff@invalid.invalid wrote:
> Hello
>
> Using
>
> http://www.micro-active.com
>
> I find that with IE9 the page is not centred when first visited.
> Moving to another page and then back to index.php it is then centred?!
>
> With the latest Firefox, Opera, Chrome and Safari for Windows the page
> is centred from the start.
>
> Plus, if I do a W3C HTML check I see that the doctype is not known. If
> I remove the php at the top of the file then no errors found, so, what
> is wrong with the php?
>
> Thanks
>
> Geoff
>

There is nothing wrong with the PHP - PHP is server-side, and the client 
knows nothing about it.  It's your HTML which is incorrect.

The html may or may not have been generated by PHP - but it's not a PHP 
problem.  Try alt.html to figure out what's wrong with your html.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#1226

From"Beauregard T. Shagnasty" <a.nony.mous@example.invalid>
Date2011-04-20 06:40 -0400
Message-ID<iomd6d$7le$1@dont-email.me>
In reply to#1220
geoff@invalid.invalid wrote:

> http://www.micro-active.com
> ...
> Plus, if I do a W3C HTML check I see that the doctype is not known. If
> I remove the php at the top of the file then no errors found, so,
> what is wrong with the php?

A quick look at the source of the above page shows that you are
inserting a mess of JavaScript at the top of the page -- prior to the
doctype. That's a no-no.

-- 
   -bts
   -Four wheels carry the body; two wheels move the soul

[toc] | [prev] | [next] | [standalone]


#1227

From"Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Date2011-04-20 13:00 +0200
Message-ID<iomeck$s9j$1@dont-email.me>
In reply to#1220
El 20/04/2011 9:17, geoff@invalid.invalid escribió/wrote:
> I find that with IE9 the page is not centred when first visited.
> Moving to another page and then back to index.php it is then centred?!
>
> With the latest Firefox, Opera, Chrome and Safari for Windows the page
> is centred from the start.
>
> Plus, if I do a W3C HTML check I see that the doctype is not known. If
> I remove the php at the top of the file then no errors found, so, what
> is wrong with the php?

PHP is only a tool to do stuff. That stuff can include things like 
sending e-mail, creating thumbnail images or (as in your case) 
generating HTML to be sent to the browser. But the browser doesn't know 
or care about that: all it can see is the final product as it arrives 
through the internet tubes.

What's a DOCTYPE? It's a tag that you can insert at the top of an HTML 
document to tell the browser what HTML version you are using. The 
browser uses that information to pick rules on how to render the page.

What happens if the browser cannot find a DOCTYPE? It assumes that the 
HTML document is a very old one, from the early times of the web where 
DOCTYPEs did not exist yet, and it tries to render the page in the same 
way that browsers from the late 1990s would do.

So, what's your problem? This:


script type='text/javascript' 
src='assets/javascripts/soundmanager2.js'></script>
<script type='text/javascript' 
src='assets/javascripts/jquery-1.5.1.js'></script>
<script type='text/javascript'>
soundManager.debugMode = false;
soundManager.onready(function () {
/*soundManager.createSound('helloWorld', 'assets/audio-new/chord1.mp3');*/
soundManager.createSound('helloWorld', 
'assets/audio-new/welcome-plus6.mp3');
soundManager.play('helloWorld');
});
</script>	
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">


There is no DOCTYPE *on top* of the document. Even if there was one, you 
are not generating a valid HTML document. That means that the browser 
cannot follow the well-established rules on how to display a page: it 
needs to guess how to fix your document first. And that's the main 
problem: there're infinity ways to break HTML so there're infinite ways 
to fix it. You cannot predict how the browser will do it.


-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

[toc] | [prev] | [next] | [standalone]


#1228

Fromgeoff@invalid.invalid
Date2011-04-20 13:20 +0100
Message-ID<nnjtq6huii3b481dmum49ucaam42k4gcnv@4ax.com>
In reply to#1227
On Wed, 20 Apr 2011 13:00:34 +0200, "Álvaro G. Vicario"
<alvaro.NOSPAMTHANX@demogracia.com.invalid> wrote:

>There is no DOCTYPE *on top* of the document. Even if there was one, you 

Álvaro

thanks for your comments.

I have added the doctype etc info to the php at the top of the page
and now the page is centred in IE9 and the other browsers and W3C HTML
checker finds no errors.

Seems OK?

Cheers

Geoff

<?php 
session_start();
setcookie("firsttime","no");
$firsttime = $_COOKIE[firsttime];
if (@$firsttime != "no") { 
echo "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type'
content='text/html;charset=iso-8859-1'>
<!-- SEARCH-ENGINE-OFF -->
<title>Micro Active Net Ltd Home page</title>

<script type='text/javascript'
src='assets/javascripts/soundmanager2.js'></script>
<script type='text/javascript'
src='assets/javascripts/jquery-1.5.1.js'></script>    
<script type='text/javascript'>
soundManager.debugMode = false;
soundManager.onready(function () {
/*soundManager.createSound('helloWorld',
'assets/audio-new/chord1.mp3');*/
soundManager.createSound('helloWorld',
'assets/audio-new/welcome-plus6.mp3');
soundManager.play('helloWorld');
});
</script>	
"; 
}
?>


>
>-- 
>-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
>-- Mi sitio sobre programación web: http://borrame.com
>-- Mi web de humor satinado: http://www.demogracia.com

[toc] | [prev] | [next] | [standalone]


#1230

From"Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Date2011-04-20 14:28 +0200
Message-ID<iomjh1$lf0$1@dont-email.me>
In reply to#1228
El 20/04/2011 14:20, geoff@invalid.invalid escribió/wrote:
> On Wed, 20 Apr 2011 13:00:34 +0200, "Álvaro G. Vicario"
> <alvaro.NOSPAMTHANX@demogracia.com.invalid>  wrote:
>
>> There is no DOCTYPE *on top* of the document. Even if there was one, you
>
> Álvaro
>
> thanks for your comments.
>
> I have added the doctype etc info to the php at the top of the page
> and now the page is centred in IE9 and the other browsers and W3C HTML
> checker finds no errors.
>
> Seems OK?
>
> Cheers
>
> Geoff
>
> <?php
> session_start();
> setcookie("firsttime","no");
> $firsttime = $_COOKIE[firsttime];

You don't have a constant called firsttime so this should trigger a 
notice. You should enable full error reporting when developing:

ini_set('display_errors', TRUE);
error_reporting(E_ALL);



-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

[toc] | [prev] | [next] | [standalone]


#1233

Fromgeoff@invalid.invalid
Date2011-04-20 15:12 +0100
Message-ID<j8qtq6dkdsncv8shlj5qkoi9g7ankd7man@4ax.com>
In reply to#1230
On Wed, 20 Apr 2011 14:28:17 +0200, "Álvaro G. Vicario"
<alvaro.NOSPAMTHANX@demogracia.com.invalid> wrote:

>You don't have a constant called firsttime so this should trigger a 
>notice. You should enable full error reporting when developing:
>
>ini_set('display_errors', TRUE);
>error_reporting(E_ALL);


I have tried a whole lot of variations using

http://www.micro-active.com/index-test.php

which has

<?php 
session_start();
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
setcookie("firsttime","no");
$firsttime = $_COOKIE[firsttime];
if (@$firsttime != "no") { 
echo "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' etc etc

but I cannot get it right - I do see the error message "undfined
constant etc".

I have tried defining it by having

var $firsttime;
var $firsttime = '';

etc etc

but need a little more help please!

Cheers

Geoff



>
>
>
>-- 
>-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
>-- Mi sitio sobre programación web: http://borrame.com
>-- Mi web de humor satinado: http://www.demogracia.com

[toc] | [prev] | [next] | [standalone]


#1237

From"Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid>
Date2011-04-20 18:05 +0200
Message-ID<ion07v$jaq$1@dont-email.me>
In reply to#1233
El 20/04/2011 16:12, geoff@invalid.invalid escribió/wrote:
> On Wed, 20 Apr 2011 14:28:17 +0200, "Álvaro G. Vicario"
> <alvaro.NOSPAMTHANX@demogracia.com.invalid>  wrote:
>
>> You don't have a constant called firsttime so this should trigger a
>> notice. You should enable full error reporting when developing:
>>
>> ini_set('display_errors', TRUE);
>> error_reporting(E_ALL);
>
>
> I have tried a whole lot of variations using
>
> http://www.micro-active.com/index-test.php
>
> which has
>
> <?php
> session_start();
> ini_set('display_errors', TRUE);
> error_reporting(E_ALL);
> setcookie("firsttime","no");
> $firsttime = $_COOKIE[firsttime];
> if (@$firsttime != "no") {
> echo "
> <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' etc etc
>
> but I cannot get it right - I do see the error message "undfined
> constant etc".
>
> I have tried defining it by having
>
> var $firsttime;
> var $firsttime = '';
>
> etc etc
>
> but need a little more help please!

Do you even know what a constant is?

I suggest you have a look at this chapter in the PHP manual:

http://es.php.net/manual/en/langref.php

You absolutely need to read the complete chapter, but for your immediate 
needs you can start with the "Strings" and "Arrays" sections.


>> --
>> -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
>> -- Mi sitio sobre programación web: http://borrame.com
>> -- Mi web de humor satinado: http://www.demogracia.com

There's no need to quote signatures ;-)




-- 
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

[toc] | [prev] | [next] | [standalone]


#1245

Fromgeoff@invalid.invalid
Date2011-04-20 23:10 +0100
Message-ID<1vluq65cg7f4buu1cc3ts71keek9ko6gjg@4ax.com>
In reply to#1237
On Wed, 20 Apr 2011 18:05:18 +0200, "Álvaro G. Vicario"
<alvaro.NOSPAMTHANX@demogracia.com.invalid> wrote:

Álvar

I have given up the approach I was using and the following seems OK at

http://www.micro-active.com/index.php

The sound is played on the first visit in a session but not on the
second and I get no php errors and also the W3C HTML Validator finds
no errors.

I am checking to see that if the $_SESSION["index_with_sound"] is not
set then the the audio is played. The $_SESSION["index_with_sound" is
set after that part of the code so when the user goes to another page
and then returns to index.php the $_SESSION["index_with_sound"] is set
and so no sound is played.

The logic seem OK to you?

There is a problem with IE9 in that although the page is centred on
the first visit (using css), after going to another page and then
returning to the index.php file, the page is no longer centred and the
drop down menu no longer works!

This does not happen with other browsers.

Any ideas?

Cheers

Geoff

<?php 
//error_reporting(E_ALL);
session_start();
if (!isset($_SESSION["index_with_sound"])) {
echo "
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<meta http-equiv='Content-Type'
content='text/html;charset=iso-8859-1'>
<!-- SEARCH-ENGINE-OFF -->
<title>Micro Active Net Ltd Home page</title>
<script type='text/javascript'
src='assets/javascripts/soundmanager2.js'></script>
<script type='text/javascript'
src='assets/javascripts/jquery-1.5.1.js'></script>    
<script type='text/javascript'>
soundManager.debugMode = false;
soundManager.onready(function () {
/*soundManager.createSound('helloWorld',
'assets/audio-new/chord1.mp3');*/
soundManager.createSound('helloWorld',
'assets/audio-new/welcome-plus6.mp3');
soundManager.play('helloWorld');
});
</script>	
"; 
}
$_SESSION["index_with_sound"] = "yes";
?>

[toc] | [prev] | [next] | [standalone]


#1249

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-04-20 23:48 -0400
Message-ID<ioo9e4$fv1$1@dont-email.me>
In reply to#1245
On 4/20/2011 6:10 PM, geoff@invalid.invalid wrote:
> On Wed, 20 Apr 2011 18:05:18 +0200, "Álvaro G. Vicario"
> <alvaro.NOSPAMTHANX@demogracia.com.invalid>  wrote:
>
> Álvar
>
> I have given up the approach I was using and the following seems OK at
>
> http://www.micro-active.com/index.php
>
> The sound is played on the first visit in a session but not on the
> second and I get no php errors and also the W3C HTML Validator finds
> no errors.
>

Any site which interferes with the music I currently have on my machine 
will not receive a second visit from me.  A lot of others feel the same.

> I am checking to see that if the $_SESSION["index_with_sound"] is not
> set then the the audio is played. The $_SESSION["index_with_sound" is
> set after that part of the code so when the user goes to another page
> and then returns to index.php the $_SESSION["index_with_sound"] is set
> and so no sound is played.
>
> The logic seem OK to you?
>

Only if you want people to visit only once then leave.

> There is a problem with IE9 in that although the page is centred on
> the first visit (using css), after going to another page and then
> returning to the index.php file, the page is no longer centred and the
> drop down menu no longer works!
>
> This does not happen with other browsers.
>
> Any ideas?
>
> Cheers
>
> Geoff
>

Check your HTML after they've visited other pages.  But this is NOT a 
PHP problem.

<irrelevant code snipped>

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#1250

Fromgeoff@invalid.invalid
Date2011-04-21 06:33 +0100
Message-ID<qufvq6lhla5h9ankbdc5a33hd2s368raf6@4ax.com>
In reply to#1249
On Wed, 20 Apr 2011 23:48:16 -0400, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

>> The logic seem OK to you?
>>
>
>Only if you want people to visit only once then leave.

Jerry

OK! I am coming round to agreeing with you.

>Check your HTML after they've visited other pages.  But this is NOT a 
>PHP problem.

I looked at the html on returning to index.php and low and behold the
doctype info was missing! Once I added an "else" section to the php
which echoed the doctype code info on the return when the
$_SESSION["index_with_sound"] was set the page centred itself and the
drop down menu worked.

Interesting that browsers other than IE9 somehow still showed the
doctype code on return!?

Cheers

Geoff

[toc] | [prev] | [next] | [standalone]


#1232

From"Beauregard T. Shagnasty" <a.nony.mous@example.invalid>
Date2011-04-20 09:17 -0400
Message-ID<iommch$q72$1@dont-email.me>
In reply to#1228
geoff@invalid.invalid wrote:

> I have added the doctype etc info to the php at the top of the page
> and now the page is centred in IE9 and the other browsers and W3C
> HTML checker finds no errors.

I just ran your page by the validator again, and it still says it can't
find the doctype. 

Errors found while checking this document as HTML 4.01 Transitional!
Result:   5 Errors, 5 warning(s) 


Maybe it is because of the blank line before it. Maybe it is because of
the single-quote marks in your doctype. Remove the blank line in the
resultant HTML and copy/use this (with double-quotes):

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

-- 
   -bts
   -Four wheels carry the body; two wheels move the soul

[toc] | [prev] | [next] | [standalone]


#1234

From"Beauregard T. Shagnasty" <a.nony.mous@example.invalid>
Date2011-04-20 10:49 -0400
Message-ID<iomrqj$sd3$1@dont-email.me>
In reply to#1232
Beauregard T. Shagnasty repliedto hisself:

> geoff@invalid.invalid wrote:
>> I have added the doctype etc info to the php at the top of the page
>> and now the page is centred in IE9 and the other browsers and W3C
>> HTML checker finds no errors.
> 
> I just ran your page by the validator again, and it still says it can't
> find the doctype. 
> 
> Errors found while checking this document as HTML 4.01 Transitional!
> Result:   5 Errors, 5 warning(s) 
> 
> Maybe it is because of the blank line before it. Maybe it is because of
> the single-quote marks in your doctype. Remove the blank line in the
> resultant HTML and copy/use this (with double-quotes):
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>    "http://www.w3.org/TR/html4/strict.dtd">

And I think I'll add this, which is still OT for a PHP group, but I see
it as important. In your CSS, you've assigned a font-size of 80% ...
that is below my aged eyes' ability. And you're using Verdana. Use 100%
for your base font, and drop the overly-large Verdana font.

body {
background-image: url(pattern.png) ;
font-size:80%; /* 62.5*/
font-family:verdana,helvetica,arial,sans-serif;
line-height:1;
/*behavior: url(csshover2.htc);*/
}

line-height: 1  is less than normal. You should drop that.
Was 62.5%??  Were you reading about the horrible Clagnut method?
See:  http://tekrider.net/html/fontsize.php

-- 
   -bts
   -Four wheels carry the body; two wheels move the soul

[toc] | [prev] | [next] | [standalone]


#1235

Fromgeoff@invalid.invalid
Date2011-04-20 16:29 +0100
Message-ID<vgutq69842sbpo7mtsdtauoah8eei2qv52@4ax.com>
In reply to#1234
On Wed, 20 Apr 2011 10:49:55 -0400, "Beauregard T. Shagnasty"
<a.nony.mous@example.invalid> wrote:

>Beauregard T. Shagnasty repliedto hisself:
>
>> geoff@invalid.invalid wrote:
>>> I have added the doctype etc info to the php at the top of the page
>>> and now the page is centred in IE9 and the other browsers and W3C
>>> HTML checker finds no errors.
>> 
>> I just ran your page by the validator again, and it still says it can't
>> find the doctype. 
>> 
>> Errors found while checking this document as HTML 4.01 Transitional!
>> Result:   5 Errors, 5 warning(s) 
>> 
>> Maybe it is because of the blank line before it. Maybe it is because of
>> the single-quote marks in your doctype. Remove the blank line in the
>> resultant HTML and copy/use this (with double-quotes):
>> 
>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>>    "http://www.w3.org/TR/html4/strict.dtd">
>
>And I think I'll add this, which is still OT for a PHP group, but I see
>it as important. In your CSS, you've assigned a font-size of 80% ...
>that is below my aged eyes' ability. And you're using Verdana. Use 100%
>for your base font, and drop the overly-large Verdana font.
>
>body {
>background-image: url(pattern.png) ;
>font-size:80%; /* 62.5*/
>font-family:verdana,helvetica,arial,sans-serif;
>line-height:1;
>/*behavior: url(csshover2.htc);*/
>}
>
>line-height: 1  is less than normal. You should drop that.
>Was 62.5%??  Were you reading about the horrible Clagnut method?
>See:  http://tekrider.net/html/fontsize.php

I will take a look at the font sizes but just for the minute I have
gone back to 

http://www.micro-active.com/index.php

which is seen by W3C HTML Checker as HTML 4.01 Strict and sees no
errors.

But if I add a line such as

error_reporting(E_ALL);

I then get loads of errors in the Checker.

Plus in the normal browser window I see "undefined constant firsttime"
line 5

see

http://www.micro-active.com/index2.php

?!

Geoff






[toc] | [prev] | [next] | [standalone]


#1239

From"Beauregard T. Shagnasty" <a.nony.mous@example.invalid>
Date2011-04-20 12:51 -0400
Message-ID<ion2uk$l9p$1@dont-email.me>
In reply to#1235
geoff@invalid.invalid wrote:

> Beauregard T. Shagnasty wrote:
>> Beauregard T. Shagnasty repliedto hisself:
>>> I just ran your page by the validator again, and it still says it can't
>>> find the doctype. 
>>> 
>>> Errors found while checking this document as HTML 4.01 Transitional!
>>> Result:   5 Errors, 5 warning(s) 
>>> 
>>> Maybe it is because of the blank line before it. Maybe it is because of
>>> the single-quote marks in your doctype. Remove the blank line in the
>>> resultant HTML and copy/use this (with double-quotes):
>>> 
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
>>>    "http://www.w3.org/TR/html4/strict.dtd">
>>
>> And I think I'll add this, which is still OT for a PHP group, but I
>> see it as important. In your CSS, you've assigned a font-size of 80%
>> ... that is below my aged eyes' ability. And you're using Verdana.
>> Use 100% for your base font, and drop the overly-large Verdana font.
>>
>> body {
>> background-image: url(pattern.png) ;
>> font-size:80%; /* 62.5*/
>> font-family:verdana,helvetica,arial,sans-serif;
>> line-height:1;
>> /*behavior: url(csshover2.htc);*/
>>}
>>
>> line-height: 1  is less than normal. You should drop that.
>> Was 62.5%??  Were you reading about the horrible Clagnut method?
>> See:  http://tekrider.net/html/fontsize.php
> 
> I will take a look at the font sizes but just for the minute I have
> gone back to 
> 
> http://www.micro-active.com/index.php
> 
> which is seen by W3C HTML Checker as HTML 4.01 Strict and sees no
> errors.

At the moment...

> But if I add a line such as
> error_reporting(E_ALL);
> I then get loads of errors in the Checker.

Well, yeah. "errors" are not valid HTML!

> Plus in the normal browser window I see "undefined constant firsttime"
> line 5

Follow Alvaro's advice about " constants " and such. Your page inserts
HTML *above* (preceding) the doctype about your errors, thus blowing the
validity of it. Look at the source!

> see
> http://www.micro-active.com/index2.php

Errors found while checking this document as HTML 4.01 Transitional!
Result:   22 Errors, 8 warning(s) 

In your CSS, please don't change the font-size and boldness of links
when hovered. Doing so makes the text jump about. A color change should
be sufficient.

-- 
   -bts
   -Four wheels carry the body; two wheels move the soul

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web