Unable to validate some code & IE CSS problem

  • Thread starter Paul F. Johnson
  • Start date
P

Paul F. Johnson

Hi,

The top of the HTML on the webpages at http://www.all-the-johnsons.co.uk
looks like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="Bluefish">
<meta name="author" content="Paul">
<meta name="copyright" content="PFJ 2003">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>www.all-the-johnsons.co.uk - ACCU Mentored Developers GUI
programme</title>
<link href="../css/atj.css" rel="stylesheet" type="text/css" />
<script src="../javascript/netscape.js" language="javascript"
type="text/javascript">
</script>
</head>
<body>

When I come to validate this, I get on just about every page the same
errors that </head> is not allowed as <head> is not open and the <body> is
not allowed where it is.

From what I can see though, there is nothing missing, head is open and
body is straight after the </head>.

Anyone spot the problem there?

My second problem is on the stylesheet (which does validate). Under IE 6,
this causes a problem

#container { position: relative; width: auto; margin:
auto; padding: 0; color: #000; background: white
url("/images/arrow.png") no-repeat scroll -30%30%; text-align: left;}

If the url("/images/arrow.png") is omitted, everything looks fine and
dandy, if it's in there, then the pages at
http://www.all-the-johnsons/accu/index.html (click on the lessons on the
left) go screwy with their formatting.

I'm currently re-working these pages as they totally fail to validate, so
that may be the problem.

Is it that the open source browsers are more forgiving when it comes to
style sheet mishaps or have I hit undefined behaviour in HTML?

TTFN

Paul
 
D

David Dorward

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

Why not Strict?
<html>
<head>
<meta name="generator" content="Bluefish">

Advert? :)
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
Suboptimal
http://www.htmlhelp.com/tools/validator/charset.html

<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
<title>www.all-the-johnsons.co.uk - ACCU Mentored Developers GUI
programme</title>
<link href="../css/atj.css" rel="stylesheet" type="text/css" />

The joy of copy/paste.

While the / is fine (and required) in XHTML, in HTML it is the same as:

<link href="../css/atj.css" rel="stylesheet" type="text/css">&gt;

As Character Data is not allowed in the head, and as </head> is optional, it
is actually the same as:

<link href="../css/atj.css" rel="stylesheet"
type="text/css"> said:
<script src="../javascript/netscape.js" language="javascript"
type="text/javascript">
</script>
</head>

So when you get to here said:

And said:
My second problem is on the stylesheet (which does validate). Under IE 6,
this causes a problem

#container { position: relative; width: auto; margin:
auto; padding: 0; color: #000; background: white
url("/images/arrow.png") no-repeat scroll -30%30%; text-align:

-30%30%? I think you missed a space.
Is it that the open source browsers are more forgiving when it comes to
style sheet mishaps or have I hit undefined behaviour in HTML?

Generally, MSIE is the most forgiving browser.
 
D

DU

David said:
Paul F. Johnson wrote:




Why not Strict?




Advert? :)




Suboptimal
http://www.htmlhelp.com/tools/validator/charset.html

That page does not say much. This page however identifies the
differences between both character sets:
http://en.wikipedia.org/wiki/ISO_8859-15

"ISO/IEC 8859-1 suffers from a number of deficiencies, including the
omission of a few French diacritics and the lack of a Euro symbol. For
this reason ISO/IEC 8859-15 has been developed as an update of ISO/IEC
8859-1 to add the required additional characters. (This required however
the removal of some less used characters from ISO/IEC 8859-1, including
fraction symbols and letter-free diacritics: ¤, ¦, ¨, ´, ¸, ¼, ½ and ¾.)"
http://en.wikipedia.org/wiki/ISO_8859-1

I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
Europeans are more likely to need to use iso-8859-15 for their webpages.

I agree and support entirely the rest of your post.

DU
 
M

Mark Parnell

I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
Europeans are more likely to need to use iso-8859-15 for their webpages.

I believe he was saying that specifying it in the meta tag rather than
in the http headers was suboptimal, rather than the actual choice of
encoding. :)
 
D

David Dorward

I'm just a bit curious as to why you say iso-8859-1 is suboptimal.
Europeans are more likely to need to use iso-8859-15 for their webpages.

I don't - I say using <meta> for this is suboptimal.
 
J

Jukka K. Korpela

DU said:
This page however identifies the
differences between both character sets:
http://en.wikipedia.org/wiki/ISO_8859-15

"ISO/IEC 8859-1 suffers from a number of deficiencies, including
the omission of a few French diacritics and the lack of a Euro
symbol. For this reason ISO/IEC 8859-15 has been developed as an
update of ISO/IEC 8859-1 to add the required additional characters.

That's worse than nonsense, in a sense - it has sufficient resemblance
to truth to mislead people.

In reality, it's not about "a few French diacritics" (what was added
for French is the oe _ligature_), and it's _not_ an update of 8859-1,
just a new member of the ISO 8859 series.

Moreover, support to ISO-8859-15 in Web browsers is close to
nonexistent, and there is _no_ need to use it on the Web. (If a page
using it works, it most probably works because the browser ignores the
charset declaration and falls back to ISO-8859-1, or more honestly
to windows-1252.) The few characters that it adds to the ISO-8859-1
repertoire can easily be handled using character references or entity
references.
 
T

Toby A Inkster

Mark said:
I believe he was saying that specifying it in the meta tag rather than
in the http headers was suboptimal, rather than the actual choice of
encoding. :)

Of course, this doesn't have to be an either/or situation.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top