Hiermenus Go Forth, XV - DHTML Lab | 3
Hiermenus Go Forth, XV:
Version 4.0.8 - The Complete Script (Full-Window)
Problems reported with 4.0.7 and fixed in 4.0.8 (cont'd)
In IE5Mac, some pages would display menus with bad widths, heights and image positioning. In fact the menus would look completely wonky. The same menus on other pages would be perfect! This same problem also occurs in IE6Win beta.
This is the same problem we had in Version 3 and addressed in the FAQ, as FAQ#13. Please read the FAQ for background to the problem. The answer we gave then is modified and reprinted here:
IE5 for the Macintosh has been universally acclaimed as the most standards-compliant browser released from the "big two" vendors. For example, see WebReview's CSS support table. Its support of the HTML 4 standard is also the most W3C-compliant.
In many cases, its support may be "too" good.
Many authors are now using the DOCTYPE tag at the beginning of their documents to define the Document Type Declaration (DTD) that the document adheres to. If you are unfamiliar with DOCTYPE and DTD's, there is a useful overview on HTML with Style that will bring you up-to-date quickly.
Here is an example DOCTYPE tag:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
Many third-party HTML editors add DOCTYPE to the beginning of documents automatically. Authors rarely exclude it from pages where it has been inserted automatically, because more often than not they regard DOCTYPE as "harmless overhead." Until the release of IE5 Macintosh, DOCTYPE was truly a "vanity tag," like many of the META tags identifying page-creation software, since no browser from Microsoft or Netscape parsed it in any useful manner.
IE5 Macintosh and IE6Win read DOCTYPE and if a DTD URL is specified, load the DTD and compare your document's syntax against it. If your document does not comply completely with the DTD, a syntax error may be generated.
Even if your syntax is correct, the DTD may force the browser to render elements differently than if no DTD was included. For example, IE renders element width and padding in a non-W3C-standard way. However, if you include a DTD URL, IE changes the rendering to the standard way.
In the case of the HM script, it means that if a DTD URL is included, IE5Mac and IE6Win beta will render just like Gecko (NS6). Without the DTD URL, they will render like IE4/5Win.
This is not a problem since authors test their pages and can adjust their values. With HM, and other similar third-party scripts, the host page make-up is unknown. We need to allow these IE "DTD browsers" to use either of two value sets, depending on the existence or not of the DTD URL.
We have done just that in Version 4.0.8, by checking for the existence of a DTD URL using the document.doctype object. The official Microsoft documentation states that document.doctype is available only in IE6Win. In reality, it has already been made available in IE5Mac, and exists in Gecko as well.
By parsing the as-yet-undocumented name property of document.doctype we can ascertain the inclusion of a DTD URL. Now, we can easily point the browser to the relevant values to use for sizing the elements.
The major outstanding issue involves the correct evaluation of JS statements used in the declaration of parameters. The page-specific and global parameters accept most JS expressions.
Some expressions, especially those involving foreign characters or font names are still problematic. We will attempt to include the new algorithm we are working on in the next release.
Again, if you don't know what we're talking about, it means you are not having problems, which is a good thing.
On the next page, the sample page included in the download.
Produced by Peter Belesis andAll Rights Reserved. Legal Notices.
Created: April 5, 2001
Revised: April 5, 2001