W3C home > Mailing lists > Public > public-html@w3.org > April 2007

style.background rendering - browser inconsistency

From: David Dailey <david.dailey@sru.edu>
Date: Tue, 03 Apr 2007 11:53:30 -0400
Message-Id: <>
To: public-html@w3.org

I'm not sure if this is an HTML problem or a CSS problem or an ECMA 
script problem, so am not sure if it belongs in this discussion or 
not.  I suppose it has to do with the orthogonality principle.

Consider the following:
<div style="background:#afa" id="Q">Bonjour</div>
<div id="R"></div>

It doesn't matter if I use innerHTML or a DOM2 nodeValue approach -- 
alert() shows the same discrepancy.

The string returned by different browsers differs:
IE -- #afa
Firefox -- rgb(170, 255, 170) none repeat scroll 0% 0%
Opera -- #aaffaa

One can program around it, but it is a bit counterintuitive to me 
that one gets three different answers.

David Dailey 
Received on Tuesday, 3 April 2007 18:51:05 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:18 UTC