in Internet Explorer 6 (haven't tried 5/5.5) it completely bugs out
with the rendering of the page when having a background-image in a css
(I will provide the sample code for you to see for yourselves).
Even though it bugs out, it seems to maintain the "white-space: pre;"
style attribute
When I remove the <!DOCTYPE...> line it completely ignores the
"white-space: pre;" attribute...but at least it doesn't bug out.
So the question is how will I be able to maintain the "white-space:
pre;" attribute without making IE bug out? (I personally am using
mozilla, then all this is no problem, but I have to consider the IE
users as well :/ )
Can anyone help?
***************** SAMPLE CODE (IE bug-out)*******************
1)
See that you chose a backgroundimage that is shorter than the width of
your screen
2)
Either fill the iframe with some extra rows so that scrollbars appear
(and then scroll it up and down) or you just make your IE to a window
that is somewhat wider than the background image you chose and then
scroll up and down the window
The result should make the text (and images) kind of "smudge" over the
screen
******* main HTML **********
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="test.css">
</head>
<body>
<a href="mainFrame.html#first" target=theFrame>The first one in the
rame</a><br>
<a href="mainFrame.html#second" target=theFrame>The Second in the
frame</a><br>
<a href="mainFrame.html#third" target=theFrame>The third one in the
frame</a>
<iframe class="contents" id="theFrame" name="theFrame"
src="mainFrame2.html" frameborder="0"></iframe>
</body>
</html>
***************** CSS for the main html (test.css)*******************
.contents{
position: absolute;
top: 200px;
left: 0px;
width: 100%;
height: 550px;
font-family: Trebuchet MS, Arial, sans-serif;
}
***************** HTML for the main frame (mainFrame.html) **********
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="frame.css">
</head>
<body>
<a name="first"></a>
First test...<br>
This
is
just
a
test
of
white-space:pre;
<a name="second"></a>
<h1>Second test</h1>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br>
<a name="third"></a>
Third test
</body>
</html>
*************** the CSS for the main Frame (frame.css)************
body
{
background-image: url(some_image.png); /*can be of any imagetype*/
background-position: top;
background-attachment: fixed;
background-repeat: no-repeat;
font-family: Trebuchet MS, Arial, sans-serif;
white-space: pre;
font-size: 14px;
line-height: 17px;
}
I resolved a height problem in an <input> tag, the heights were different in
the two browsers, by using the <?xml version="1.0"?> tag.
It is worth validating your pages, http://validator.w3.org/ , although
keeping the <?xml version="1.0"?> tag could invalidate your pages - ironic!!
Alun.
"Phoenix" <phoe...@hotmail.com> wrote in message
news:89d8438d.03042...@posting.google.com...
What I would want is for it to accept my style definition
(white-space: pre;) while not displaying this "smudge" effect.
IE's behaviour is very strange (I guess that's how it goes when you
don't follow the standards)
"Jones" <a.j...@hccnet.nl> wrote in message news:<b8altb$pc7$1...@news.hccnet.nl>...
(My dog has some comments. I will translate.)
> Add this tag as the first tag in mainFrame.html: <?xml version="1.0"?>
Woof! (tags!)
> This will resolve your problem in IE6, IE5 works correctly.
Grrrr! Grr... (IE5 works correctly? I beg to differ.)
> Why this works is unclear to me, but it appears to produce render in IE6
> equivalent to IE5.
Grr. Woof! (Why would you want to do that?)
> IE6 seems to need this tag to function correctly, or at least to be
> compatable with HTML4.x.
Arf! Arf! Arf! (Hah! Hah! Hah!)
> I resolved a height problem in an <input> tag, the heights were different in
> the two browsers, by using the <?xml version="1.0"?> tag.
Grr. Yawn. (Tags again?)
> It is worth validating your pages, http://validator.w3.org/ , although
> keeping the <?xml version="1.0"?> tag could invalidate your pages - ironic!!
Woof! (Ironic.)
[Snip full quote of extremely long O.P.]
> The problem is this, that when I use the
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
>
> in Internet Explorer 6 (haven't tried 5/5.5) it completely bugs out
> with the rendering of the page when having a background-image in a css
> (I will provide the sample code for you to see for yourselves).
> Even though it bugs out, it seems to maintain the "white-space: pre;"
> style attribute
>
> When I remove the <!DOCTYPE...> line it completely ignores the
> "white-space: pre;" attribute...but at least it doesn't bug out.
>
> So the question is how will I be able to maintain the "white-space:
> pre;" attribute without making IE bug out? (I personally am using
> mozilla, then all this is no problem, but I have to consider the IE
> users as well :/ )
> Can anyone help?
One last thing you could try before killing some M$ people is use the
doctype WITHOUT THE URL:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
--
Thomas Mlynarczyk
http://members.surfeu.de/home/tomtomatic
ME VELLE CIVEM ESSE TOTIUS MUNDI NON UNIUS OPPIDI.
> Add this tag as the first tag in mainFrame.html: <?xml version="1.0"?>
> This will resolve your problem in IE6, IE5 works correctly.
That's bad advice.
The XML decalration causes Windows IE 6 to fall into its Quirks mode.
That behavior is considered a bug (at least by outside observers) and
might be fixed all of a sudden. If you want quirks, get rid of the
doctype decalration. (Of course, it would be better not to rely on
quirks.)
Besides, using an XML declaration with a HTML doctype is bogus.
--
Henri Sivonen
hsiv...@iki.fi
http://www.iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
> > Add this tag as the first tag in mainFrame.html: <?xml version="1.0"?>
> > This will resolve your problem in IE6, IE5 works correctly.
>
> That's bad advice.
I strongly concur. (To coin a phrase.)
> Besides, using an XML declaration with a HTML doctype is bogus.
Surely that depends wholly on whether:
1) the file is well-formed XML, which HTML may be - completely
independent of XHTML nonsense.
2) The referenced DTD is parseable as an XML DTD - regardless of
whether the document type it describes is in all cases. Just to be
clear about what I'm saying: the XML declaration refers only to the
instance it appears with, other documents of the same type may not be
well-formed XML.
So, I say that a prologue like this:
<?xml version="1.0" ?>
<!DOCTYPE html SYSTEM "html4-customized-NoTagOmissionFluff.dtd">
- ain't bogus. And I wonder, in a non-validating system where the DTD
will never actually be read, does (2) apply?
And I ask, incidentally, what is the correct term for the field in a
DTD that specifies tag omission: the - O or - - bit?
> > Besides, using an XML declaration with a HTML doctype is bogus.
>
> Surely that depends wholly on whether:
...
> 2) The referenced DTD is parseable as an XML DTD
...
> <!DOCTYPE html SYSTEM "html4-customized-NoTagOmissionFluff.dtd">
When I said "a[n] HTML doctype" I meant a doctype defined by an
organization that publishes official HTML specifications. Those refer to
DTDs that aren't XML-compatible. (I expect you to reply that the
officialness of the W3C is suspect. :-) I didn't mean any homegrown
doctype that just happens to have "html" as the root element GI.
> And I ask, incidentally, what is the correct term for the field in
> a DTD that specifies tag omission: the - O or - - bit?
Minimization rules. YSMV.
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>a_color_machineStart.html</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<style type="text/css">
<!--
.hoog {height:30px;}
-->
</style>
</head>
<body>
<p>
<input class="hoog" type="text" />
</p>
</body>
</html>
>Using your template in IE6. Note how The height of the <input> changes when
>you remove the first line.
>With <?xml version="1.0" encoding="iso-8859-1"?> included, IE6 renders the
>same as IE5, Moz etc., but without it the hight is increased.
Without the <?xml ... ?> IE6 is in standards mode and so
height: 30px; means that the content area of the element has a height
of 30 pixels and padding and border are added on the outside of this.
With the <?xml ... ?> IE6 is in quirks mode (so it copies the bugs of
IE5) and includes the padding and border inside the 30 pixels
specified for the height.
Hence the overall height (border+padding+content) is larger in
standards mode than in quirks mode.
It is a bug in IE5 that that height is calculated incorrectly.
It is a bug in IE6 that the presence of an XML declaration puts it
into quirks mode.
If Mozilla is showing the same overall height as IE5 then that sounds
like a bug in Mozilla.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st...@pugh.net> <http://steve.pugh.net/>
Very suspect. There's a theory going around ciwas that they're just a
bunch of pot-smoking MIT students having a practical joke. (Sort of
like an updated version of the Bavarian Illuminati in the 60's?)
> I didn't mean any homegrown
> doctype that just happens to have "html" as the root element GI.
Neither did I. I was just pointing out that if an HTML instance
doesn't contain any empty elements or tag omission it's well-formed
XML. So you can rightly put an xml declaration on some, but not all,
HTML instances.
Then I came to point that XML DTDs don't have the tag minimization
field, whereas HTML DTDs do. So a validating system will puke before
it ever starts reading the instance. But an ordinary XML browser will
happily accept a DOCTYPE declaration that references an unmodified
HTML DTD.
The whole business seems bodgey to me. But the "quantum of bodginess"
(or "degree of bogosity", if you prefer) would seem to hinge on
whether an HTML/XML instance requires a specific reference to a
particular DTD. (Or even requires a DOCTYPE declaration at all?)
<?xml version="1.0" ?>
<!DOCTYPE html>
<html>
<head><title>Am I bodgey, or am I not?</title></head>
<body><p>"Bogus" is an Americanism that means bodgey.</p></body>
</html>
My vague recollection (XML spec is one of many W3C pages that crash
Opera) is that XML DOCTYPE declarations require a system identifier to
always be included?
I should probably stop now, just confusing myself...
That's what I've been trying to ask if there's any answer to, but the
postings seem to have derailed some from the main question :/
"Jones" <a.j...@hccnet.nl> wrote in message news:<b8bhil$7q7$1...@news.hccnet.nl>...
Tested that as well.. but then it (again) loses the "white-space:
pre;" style definition :/
It seems that without the URL it doesn't accept it (and with the URL
it smudges the contents :( )
I really should put this sample on a homepage somewhere in order for
posters to view it.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
The DOCTYPE will put the browser in "standard" mode ensuring that
white-space:pre; works correctly.
The <meta> data charset is needed to validate the documents.
The "bluring" of the page in IE6:
frame.css -
body
{
background: #fff url(anImage.gif) no-repeat top; /*can be of any
imagetype*/
color: #000;
font-family: "Trebuchet MS", Arial, sans-serif;
white-space: pre;
font-size: 14px;
line-height: 17px;
}
Put all the background properties on the one line, cures the "blur".
Two other minor changes for validation.
test.css -
.contents{
position: absolute;
top: 200px;
left: 0px;
width: 100%;
height: 550px;
font-family: "Trebuchet MS", Arial, sans-serif;
}
One minor change for validation.
I've validated all documents, it works in IE6, Netscape6.2 and 7, Moz1.0,
Opera6 and 7.
In IE5 the css white-space:pre; was never supported (correct me if I'm
wrong), so you would have to use <pre>, but there is no "bluring".
Thanks again (and now you can also add that it was verified with Moz
1.4b - nightly ;))
"Jones" <a.j...@hccnet.nl> wrote in message news:<b8gq0s$njl$1...@news.hccnet.nl>...
"Phoenix" <phoe...@hotmail.com> wrote in message
news:89d8438d.03042...@posting.google.com...
| But an ordinary XML browser will happily accept a DOCTYPE declaration
| that references an unmodified HTML DTD.
That should be: But an ordinary XML browser, as a nonvalidating parser,
will happily accept an unmodified HTML DTD as the external subset in a
DOCTYPE declaration.
(First, whether XML *browsers* should be non-validating is an open
issue. Second, the external subset is not a reference.)
| My vague recollection (XML spec is one of many W3C pages that crash
| Opera) is that XML DOCTYPE declarations require a system identifier to
| always be included?
As a matter of fact, no.
http://www.w3.org/TR/REC-xml#sec-prolog-dtd
| I should probably stop now, just confusing myself...
I don't know if this applies to you, but it's a singularly bad idea to
believe anything the HTML specs say about SGML.
I don't want to say anything that will inflame Mobzilla again, I'm
growing weary of their screeching. Sooo... Mozilla parses and renders
XML documents without going anywhere near the DTD therefore that
*MUST* be the correct thing to do.
> Second, the external subset is not a reference.)
Yes. (But, disregarding correct terminology for just a moment, surely
in a non-validating system a reference is all the identifiers are?) Is
this "external subset" terminology an XML invention? The few pre-XML
sources I've read refer only to "the DTD" and "the internal set", I
got the impression the terminology was changed to "external subset"
and "internal subset" by the XML 1.0 specification?
> | My vague recollection (XML spec is one of many W3C pages that crash
> | Opera) is that XML DOCTYPE declarations require a system identifier to
> | always be included?
>
> As a matter of fact, no.
>
> http://www.w3.org/TR/REC-xml#sec-prolog-dtd
Yep. That's the evil URL that was crashing Opera last week. After I
complained about it in ciwas last week, I learned that the problem was
well known in more Opera-oriented groups. It was all in W3C's bodgey
browser sniffing scripts, apparently. Working now though.
> | I should probably stop now, just confusing myself...
>
> I don't know if this applies to you, but it's a singularly bad idea to
> believe anything the HTML specs say about SGML.
Deleting the last two words of that sentence can't send you too far
wrong, either.
|> Second, the external subset is not a reference.)
|
| Yes. (But, disregarding correct terminology for just a moment, surely
| in a non-validating system a reference is all the identifiers are?)
Possibly, except that it's important to be clear about what kind of
reference this would be. The contents of the reference are just a set
of declarations whose significance pertains only to the *parsing* of the
document. Using the reference as an indication to the *processing* of
the parsed document would in any case be an error. (This is the doctype
sniffing bogosity, of course.)
| Is this "external subset" terminology an XML invention?
No, it's an old SGML-ism. ISO 8879 doesn't have a formal definition,
but the term is used in Goldfarb's _SGML Handbook_.
| The few pre-XML sources I've read refer only to "the DTD" and "the
| internal set",
It became quite common to call external subsets DTDs even though this
was a misnomer. It didn't matter as long as the clue-challenged were
not let loose with the terminology.
In article <ro0ravg438uhnje94...@4ax.com>,
Arjun Ray <ar...@nmds.com.invalid> wrote:
>Possibly, except that it's important to be clear about what kind of
>reference this [a <!DOCTYPE] would be. The contents of the reference
>are just a set of declarations whose significance pertains only to the
>*parsing* of the document. Using the reference as an indication to
>the *processing* of the parsed document would in any case be an error.
>(This is the doctype sniffing bogosity, of course.)
Hmmm. I'm not completely following you here, but how then does the
<!SGMLDECL (from WebSGML) fit into the picture? While a <!DOCTYPE
arguably only does the equivalent of a #include, the <!SGMLDECL seems
to me to be relevant to the much maligned DOCTYPE sniffing. And as best
I can tell, BTW, the SGML Declaration is not considered part of the
prologue (for whatever relevance that may have).
Wouldn't it make sense to refer to it as the distinction between a
Reference and an Identifier?
--
T.E.R.J.E. - Technician Engineered for Repair and Justified Exploration
B.L.E.S.S. - Biomechanical Lifeform Engineered for Scientific Sabotage
While quoting:
> In article <ro0ravg438uhnje94...@4ax.com>,
> Arjun Ray <ar...@nmds.com.invalid> wrote:
You've added a parenthesis:
> >Possibly, except that it's important to be clear about what kind of
> >reference this [a <!DOCTYPE] would be...
What I wrote and Arjun Ray replied to was this:
(But, disregarding correct terminology for just a moment, surely
in a non-validating system a reference is all the identifiers are?)
So your snippet above should read:
> >Possibly, except that it's important to be clear about what kind of
> >reference this [an FPI] would be...
--
Karl Smith.