![]() |
|
|
|||||||
![]() |
HTML - Unable to validate some code & IE CSS problem |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 -- One OS to fool them all One browser to find them One email client to bring them all And through security holes, blind them... Paul F. Johnson |
|
|
|
|
#2 |
|
Posts: n/a
|
Paul F. Johnson wrote:
> <!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">> 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"></head><body>> > <script src="../javascript/netscape.js" language="javascript" > type="text/javascript"> > </script> > </head> So when you get to here, you can't close <head> becuase it is already open. > <body> And <body> can't be a child element of <body> > 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. > left;} > 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. -- David Dorward <http://dorward.me.uk/> |
|
|
|
#3 |
|
Posts: n/a
|
David Dorward wrote:
> Paul F. Johnson wrote: > > >><!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 > > 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 >><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">> > > 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"></head><body>> > > >><script src="../javascript/netscape.js" language="javascript" >>type="text/javascript"> >></script> >></head> > > > So when you get to here, you can't close <head> becuase it is already open. > > >><body> > > > And <body> can't be a child element of <body> > >>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. > > >>left;} > > >>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. > |
|
|
|
#4 |
|
Posts: n/a
|
On Tue, 06 Jan 2004 17:48:18 -0500, DU declared in alt.html:
> David Dorward wrote: >> Paul F. Johnson wrote: >> >>><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"> >> >> Suboptimal >> http://www.htmlhelp.com/tools/validator/charset.html > > 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. -- Mark Parnell http://www.clarkecomputers.com.au |
|
|
|
#5 |
|
Posts: n/a
|
DU wrote:
>>><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15"> >> Suboptimal >> http://www.htmlhelp.com/tools/validator/charset.html > 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. -- David Dorward <http://dorward.me.uk/> |
|
|
|
#6 |
|
Posts: n/a
|
DU <> wrote:
> 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. -- Yucca, http://www.cs.tut.fi/~jkorpela/ Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html |
|
|
|
#7 |
|
Posts: n/a
|
Mark Parnell wrote:
> 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. -- Toby A Inkster BSc (Hons) ARCS Contact Me - http://www.goddamn.co.uk/tobyink/?page=132 |
|
|
|
#8 |
|
Posts: n/a
|
On Wed, 07 Jan 2004 07:43:31 +0000, Toby A Inkster declared in alt.html:
> > Of course, this doesn't have to be an either/or situation. True. And in this case, it isn't, as Jukka's reply explained. -- Mark Parnell http://www.clarkecomputers.com.au |
|