Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Flash of white between pages with dark background


Guest

Recommended Posts

I have added a dark background image for all pages on my site. This was done using the following code in the stylesheet.css file:

 

BODY {

bgcolor: #000000;

background-image: url('images/siteBackground.gif');

background-attachment: fixed;

margin: 0px 0px 0px 0px

font-family: Arial, Helvetica, sans-serif;

font-size:12px;

color:#000000;

}

 

When viewing pages, the screen momentarily flashes white while moving between pages.

 

How can I eliminate or reduce this effect? I already set the bgcolor to #000000 in the stylesheet.css.

 

You can see this on my development site at www.dev.aspenshopsonline.com/oscommerce/catalog/

Link to comment
Share on other sites

I don't know if it will solve your problem or not but bgcolor is not a valid css element.

 

Jack

Thank you Jack. That put me on the right track. I deleted the bgcolor.

 

I got to wondering if I could put two background properties in the same element. Since it made sense to have the background color set before the image was loaded I set the background color first in the code and crossed my fingers. Here's the new code:

 

BODY {

background: #000000;

background-image: url('images/siteBackground.gif');

background-attachment: fixed;

margin: 0px 0px 0px 0px

font-family: Arial, Helvetica, sans-serif;

font-size:12px;

color:#000000;

}

 

It worked!

I can see during the page transition that a black screen remains displayed while the background image on the new page is being loaded. Since the image is mostly black the transition is visually much more appealing. Exactly what I was hoping to accomplish (unless there is a way to keep the background image displayed uninterrupted during the transition to the new page).

 

I appreciate you help Jack.

 

Ron

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...