Treehouse: Grow your CSS skills. Land your dream job.

index2.html With Template Not Holding Page Background At #999999 – All Other Pages Do

  • # August 14, 2012 at 1:34 am

    Relative newb here. First post. Great site.

    The following link is a site set up with Dreamweaver. Make sure not to put “www” in front of it, there are some redirects going on, but that’s not the issue.

    This page, and every other in the site, has the same template applied, with a page properties background color set as #999999. When this page loads, it will briefly flash a #999999 background, but will not hold it. Every other page will hold the #999999 background from the same template. If you don’t see it flash #999999 on the first load, hit reload a couple of times real fast in Chrome.

    If someone could please take a quick look at it I would be most grateful. I have been pulling my hair out for hours on this. It worked yesterday and I did no work on the site today prior to my first look at it live when I noticed the phenomenon. Then of course I tired to fix it to no avail. I have looked at every piece of code I can think of and can’t get just that one page to hold a #999999 or any background other than white.

    Thanks in advance for any help.


    # August 14, 2012 at 2:22 am

    It has some sort of inline style being applied via JavaScript.

    Line 7 of this file is causing it: EXc_MarketUpdate_US.js

    # August 14, 2012 at 3:00 am

    Doc, you’re a genius my friend. I would have never found that in a million years. How did you know to look there so quickly? Just trying to learn.

    Thanks so much for your help.


    # August 14, 2012 at 1:24 pm

    The first thing that I did is I inspected the element to find out *how* it was changing color. When I saw the inline styles, I assumed that it was coming from JS, or else you would just be able to remove it yourself.

    From there I searched through the scripts (also using the inspector) for the term ‘body’ to see if any of the scripts were modifying it. Took probably less than a minute of total time. This is why the Inspector is so powerful! Check out this article to learn more about it:

    # August 14, 2012 at 1:43 pm

    Will do, thank you. As an aside, I found out this morning that the third-party vendor of that market information altered their js. They are looking into as we speak. It’s got to be either their call to background-color: transparent; or their inline style to .backgroundColor=”F0F0F0″, which is basically white. Like so:

    Thanks again for your help.


    # August 14, 2012 at 1:52 pm

    Ok, just got a email from them and they fixed and it now works. They changed the code to this:

    Took out the transparent and changed the element id.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.