In article <5ee13c1a52.harriet(a)blueyonder.co.uk>,
Harriet Bazley <lists(a)orange.wingsandbeaks.org.uk> wrote:
On 28 Sep 2011 as I do recall,
John Harrison wrote:
>
> > What makes the content of this web page
> >
http://nuclearinfo.org/view/item/a2156 (which is allegedly W3C
> > checked, and doesn't seem to have any serious syntax errors
> > reported when you test it there) invisible on NetSurf when you
> > view the page on their servers, but visible if you save the
> > HTML and double-click on it locally?
>
> When I view it in their server I get what you describe (white
> area surrounded by stuff that looks normal).
>
> But if I save it and then the whole layout goes to pot, with a
> lot more white space. The missing content does render, but
> several window-depths down the page.
>
Oh yes - you get the Lynx-style display, but with actual usable
content.
I just noted this in passing, but I have now found another url
http://www.id3.org/id3v2.3.0
which does something also odd. It displays fine when viewing the
site, but goes to pot when viewing the result of a full save. The
result is similar to that mentioned above, i.e. the left sidebar is
shown at the top, and the main content (should be on the right)
appears at the bottom, with many of the styles missing. It is
obviously CSS related.
In the original there are four stylesheets referenced:
<link rel="stylesheet" type="text/css" charset="utf-8"
media="all"
href="/wiki/mentalwealth_id3/css/common.css">
<link rel="stylesheet" type="text/css" charset="utf-8"
media="screen"
href="/wiki/mentalwealth_id3/css/screen.css">
<link rel="stylesheet" type="text/css" charset="utf-8"
media="print"
href="/wiki/mentalwealth_id3/css/print.css">
<link rel="stylesheet" type="text/css" charset="utf-8"
media="projection"
href="/wiki/mentalwealth_id3/css/projection.css">
There are indeed four SSs saved in the 'full save' directory.
However, when inspecting the saved source only two have been
converted to local links, the other two have been converted to a full
remote url.
<link rel="stylesheet" type="text/css" charset="utf-8"
media="all"
href="0x76362e98"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="screen"
href="0x76490b10"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="print"
href="http://www.id3.org/wiki/mentalwealth_id3/css/print.css"&g...
<link rel="stylesheet" type="text/css" charset="utf-8"
media="projection"
href="http://www.id3.org/wiki/mentalwealth_id3/css/projection.css&qu...
This gives the 'incorrect' display, the latter two SS being
apparently ignored.
If the latter two are replaced with links to the two ignored local
files, as per
<link rel="stylesheet" type="text/css" charset="utf-8"
media="all"
href="0x76362e98"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="screen"
href="0x76490b10"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="print"
href="0x75ee41b0"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="projection" href="0x766e4950"></link>
the display is still all wrong. However, if the two media types are
removed from the latter two so it becomes
<link rel="stylesheet" type="text/css" charset="utf-8"
media="all"
href="0x76362e98"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
media="screen"
href="0x76490b10"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
href="0x75ee41b0"></link>
<link rel="stylesheet" type="text/css" charset="utf-8"
href="0x766e4950"></link>
then everything displays as it should. NetSurf appears to be dealing
with the media types differently when parsing the local html.
In the original url given by Harriet, the SSs are defined
differently, e.g.
<style type="text/css" media="all">@import
"/themes/nis/styles.css";</style>
which becomes
<style type="text/css" media="all">@import
'0x76a3b3b0;</style>
in the full save index file. NetSurf does not appear to be coping
with this format at all. Changing these references to the form
<link rel="stylesheet" type="text/css"
href="0x76a3b3b0"></link>
then produces a display more like the original, including the blank
main frame, although some of the background colouring is lost.
Make of all this what you will 8o)
--
Chris Johnson