Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CSS border rendering bug. in O7 build 2673

3 views
Skip to first unread message

Alan Hoyle

unread,
Feb 4, 2003, 10:12:57 AM2/4/03
to
CSS borders aren't rendered properly in build Opera 7 build 2673. They
worked correctly in Opera 6.05 for Win and 6.11 for Linux and in Opera
7 Build 2345 for Win.

For a demonstration, see
http://nelson.oit.unc.edu/~alanh/op7bug.html

I've already submitted this as a bug report, but I thought others
might be interested.

-alan

--
Alan Hoyle - al...@unc.edu - http://www.alanhoyle.com/
"I don't want the world, I just want your half." -TMBG
Get Horizontal, Play Ultimate.

Paul McGarry

unread,
Feb 4, 2003, 10:22:37 AM2/4/03
to
On 4 Feb 2003 15:12:57 GMT, Alan Hoyle <al...@unc.edu> wrote:

> For a demonstration, see http://nelson.oit.unc.edu/~alanh/op7bug.html
>
> I've already submitted this as a bug report, but I thought others
> might be interested.

I think it's probably related to Opera's quirks mode doctype switch
tripping over the xml bit on the first line.

--
Paul McGarry
http://pmcg.blogspot.com/

Lutz-Peter Hooge

unread,
Feb 4, 2003, 10:27:28 AM2/4/03
to
Alan Hoyle <al...@unc.edu> wrote:

from the page:
| <?xml version="1.0" encoding="iso-8859-1" ?>
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
| "http://www.w3.org/TR/REC-html401/loose.dtd">

Huh? Either write XHTML/XML or HTML 4.01.
Both at the same time doesn't make sense.

The rendering bug is because of the XML-stuff in the first line, wich
triggers quirks mode. It is a known bug.

Lutz-Peter

Paul McGarry

unread,
Feb 4, 2003, 10:59:20 AM2/4/03
to
On Tue, 4 Feb 2003 16:27:28 +0100, Lutz-Peter Hooge <lpv...@gmx.de> wrote:

> from the page:
> | <?xml version="1.0" encoding="iso-8859-1" ?>
> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> | "http://www.w3.org/TR/REC-html401/loose.dtd">
>
> Huh? Either write XHTML/XML or HTML 4.01.
> Both at the same time doesn't make sense.

What do you mean? It is valid XML and (almost, it's missing an alt tag)
html 4.01 transitional.

Jor

unread,
Feb 4, 2003, 11:08:32 AM2/4/03
to
On Wed, 05 Feb 2003 02:59:20 +1100, Paul McGarry <pa...@operamail.com>
wrote:

You specify an XML prolog, but then use an SGML Doctype.
If you want to use HTML, remove the XML prolog -- if you want to use XHTML,
change your Doctype to that.

That's what LP means here.

--
Jor | "Let him that would move
.-. | the world first move
.-. | himself." - Socrates

Lutz-Peter Hooge

unread,
Feb 4, 2003, 11:21:32 AM2/4/03
to
Paul McGarry <pa...@operamail.com> wrote:

> What do you mean?

HTML 4 is SGML and XHTML is XML.
In general they are not compatible.

> It is valid XML and (almost, it's missing an alt tag)
> html 4.01 transitional.

Thats more or less coincidence.
<http://www.cs.tut.fi/~jkorpela/html/empty.html>

Lutz-Peter

Alan Hoyle

unread,
Feb 4, 2003, 12:47:37 PM2/4/03
to
On Tue, 04 Feb 2003 17:08:32 +0100, Jor wrote:
> On Wed, 05 Feb 2003 02:59:20 +1100, Paul McGarry <pa...@operamail.com>
> wrote:
>
>> On Tue, 4 Feb 2003 16:27:28 +0100, Lutz-Peter Hooge <lpv...@gmx.de>
>> wrote:
>>
>>> from the page:
>>> | <?xml version="1.0" encoding="iso-8859-1" ?>
>>> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>> | "http://www.w3.org/TR/REC-html401/loose.dtd">
>>>
>>> Huh? Either write XHTML/XML or HTML 4.01.
>>> Both at the same time doesn't make sense.
>>
>> What do you mean? It is valid XML and (almost, it's missing an alt tag)
>> html 4.01 transitional.
>
> You specify an XML prolog, but then use an SGML Doctype.
> If you want to use HTML, remove the XML prolog -- if you want to use XHTML,
> change your Doctype to that.
>
> That's what LP means here.

If I remove the XML prolog it does render properly in Opera7 (see
http://nelson.oit.unc.edu/~alanh/op7bug-b.html), but validator.w3.org
complains as follows:

"I was not able to extract a character encoding labeling from any of
the valid sources for such information. Without encoding information
it is impossible to validate the document. The sources I tried are:

The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element."

Does this mean I've discovered a bug in the validator? What should I
do instead of using the XML declaration at the top?

Jor

unread,
Feb 4, 2003, 12:57:49 PM2/4/03
to
On 4 Feb 2003 17:47:37 GMT, Alan Hoyle <al...@unc.edu> wrote:

> Does this mean I've discovered a bug in the validator? What should I
> do instead of using the XML declaration at the top?

If you want to stick with HTML, not XHTML, you have to specify the server
to send correct HTTP Headers.

Since your server is Apache, you *might* be able to place a file named
.htaccess (nothing before the period) in your root directory, with the
following contents:

AddType 'text/html; charset=ISO-8859-1' htm html

If this is not working, your server admins have disallowed the behaviour,
and you should contact them.

A way to get past the validator is to add the following META tag to your
HTML's <head> section:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

As for the "bug" in Opera -- that is because HTML 4.01 Transitional and
earlier trigger Quirks Mode, in which a large number of MSIE bugs are
emulated.

By placing an XML prolog on an HTML DocType you are in effect specifying an
unknown DocType, which triggers Standards Mode.

If you want Opera to behave according to standards, just use HTML 4.01
Strict, or XHTML.

Alan Hoyle

unread,
Feb 4, 2003, 1:38:43 PM2/4/03
to
On Tue, 04 Feb 2003 18:57:49 +0100, Jor wrote:

> If you want Opera to behave according to standards, just use HTML 4.01
> Strict, or XHTML.

I realize this may be slightly off-topic, but the whole problem was
precipitated by a rendering problem from my home page:

http://nelson.oit.unc.edu/~alanh/index.html

I've tried to convert this to XHTML, but there's a limitation that I
don't know how to get around. I have a couple of "float:left" images
on the page that only make sense in the context of their current
paragraph and I don't want off-topic stuff to appear to their right.
Is there a way I can do the equivalent of a <br clear="all"> in xhtml?
If not, how can I get around this?

http://nelson.oit.unc.edu/~alanh/index.x.html

validator.w3.org complains: "there is no attribute "clear" (explain...)."

Jor

unread,
Feb 4, 2003, 1:53:06 PM2/4/03
to
On 4 Feb 2003 18:38:43 GMT, Alan Hoyle <al...@unc.edu> wrote:

> Is there a way I can do the equivalent of a <br clear="all"> in xhtml?
> If not, how can I get around this?

Use CSS:

{clear: none/left/right/both}

To use it with the images:

img {clear:both}

Alan Hoyle

unread,
Feb 4, 2003, 2:27:05 PM2/4/03
to
On Tue, 04 Feb 2003 19:53:06 +0100, Jor wrote:
> On 4 Feb 2003 18:38:43 GMT, Alan Hoyle <al...@unc.edu> wrote:
>
>> Is there a way I can do the equivalent of a <br clear="all"> in xhtml?
>> If not, how can I get around this?
>
> Use CSS:
>
> {clear: none/left/right/both}
>
> To use it with the images:
>
> img {clear:both}

Thanks a bunch for your help, that worked perfectly.

Alan Hoyle

unread,
Feb 4, 2003, 2:53:46 PM2/4/03
to
On Tue, 04 Feb 2003 17:08:32 +0100, Jor wrote:
> On Wed, 05 Feb 2003 02:59:20 +1100, Paul McGarry <pa...@operamail.com>
> wrote:
>
>> On Tue, 4 Feb 2003 16:27:28 +0100, Lutz-Peter Hooge <lpv...@gmx.de>
>> wrote:
>>
>>> from the page:
>>> | <?xml version="1.0" encoding="iso-8859-1" ?>
>>> | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>>> | "http://www.w3.org/TR/REC-html401/loose.dtd">
>>>
>>> Huh? Either write XHTML/XML or HTML 4.01.
>>> Both at the same time doesn't make sense.
>>
>> What do you mean? It is valid XML and (almost, it's missing an alt tag)
>> html 4.01 transitional.
>
> You specify an XML prolog, but then use an SGML Doctype.
> If you want to use HTML, remove the XML prolog -- if you want to use XHTML,
> change your Doctype to that.
>
> That's what LP means here.

More data:

I modified the headers on the following url:
http://nelson.oit.unc.edu/~alanh/op7bug-b.html

as follows:

<?xml version="1.0" encoding="iso-8859-1" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

So I'm not mixing XML and HTML (or am I). But, I still get the same rendering
bug.

So, what now? If I eliminate the XML header (see op7bug-c.html), it
does render properly.

Is the problem with the <!DOCTYPE> tag then? What should I use
instead? Something like the following?

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

If it's a problem with the <!DOCTYPE> tag, then there's a problem with
virtually all the pages on www.w3.org.

Jor

unread,
Feb 4, 2003, 3:00:54 PM2/4/03
to
On 4 Feb 2003 19:53:46 GMT, Alan Hoyle <al...@unc.edu> wrote:

> I modified the headers on the following url:
> http://nelson.oit.unc.edu/~alanh/op7bug-b.html
>
> as follows:
>
> <?xml version="1.0" encoding="iso-8859-1" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
> So I'm not mixing XML and HTML (or am I). But, I still get the same
> rendering
> bug.

This is a very unfortunate bug in Opera 7 -- it follows the IE bug in
treating anything before the DocType as an excuse to go into Quirks Mode,
even legal XML statements like the prolog, or an xml-stylesheet reference.

You are right here, but Opera is wrong.

This will be changed for a future release... with some luck, it is already
in the patch now underway.

XHTML 1.1, and XHTML 1.0 served as text/xml, application/xml, or
appplication/xhtml+xml does not suffer from this, as the Doctype switch is
used by the SGML parser only.

0 new messages