Re: NN6 and CSS Body Background Problem

by "J.J.SOLARI" <jjsolari(at)pobox.com>

 Date:  Tue, 12 Dec 2000 10:45:43 +0100
 To:  hwg-techniques(at)mail.hwg.org
  todo: View Thread, Original
On Mon, 11 Dec 2000 14:31:38 +0000, Catenae Web Sites
<catenae(at)catenae.com> wrote:

>I just checked my sites under the final release of NN6. The sites look
>fine except for one thing: None of the body background colors show up.
>I'm using linked stylesheets with the following type of statement:
>
>body { background-color: 333333; }
>
>The sites display accurately in NN4+ and IE5, and everything else (font
>sizes and colors, margins, etc.) works fine in NN6. Anyone else
>experiencing problems with this?

Triche,

yes, might be a bug in NN6 (and Mozilla too).

I have found that when you specify body background color in a style
declaration (which is a perfectly correct way), it becomes impossible to
change it dynamically afterwards.

A workaround would be to move the background color declaration from the
style tag into the body element like:

bodybg = document.getElementsByTagName('body').item(0) ;
bodybg.setAttribute('style','background-color:#333333;') ;

hih,

JJS.
-- 
/* public key id: 9eb99ddb <http://www.keyserver.net/> */
/* homepage <http://www.yoyodesign.org/> */

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA