Copy link to clipboard
Copied
I downloaded a website template that utilizes a style.css to place a particular image for the background image. I replaced the original default image with the image I want it to display. That is the only code I changed. It works on Two of 20 pages. The original image has been deleted and is no longer in the image folder. I named the new image a totally new name which i used to change in the .css file. However, when I first launch the webpages the background flashes with the correct image and then reverts back to the original image that no longer exists. I have cleared my brower history but it still only works for the two pages.
Also, please note it is the same for both in Dreamweaver preview and Chrome Browser. I also, tried viewing in Edge and I had the same result.
Here is the new code in the style.css file:
/*MAIN BACKGROUNDS*/
.body_pattern { background:#fff url("../images/Background2.png") repeat top center;/* position:fixed; top:0; left:0; width:100%; height:100%;/**/}
I changed from "../images/bg_2.png" to "../images/Background2.png"
It works properly on the contact.html page
But Reverts back to the original image on the index.html
Change as shown
Copy link to clipboard
Copied
You're likely seeing a cached version of the former page.
Clear your browser's cached data & history. On most browsers, Ctrl + F5 or Ctrl + R.
If you're seeing this in Dreamweaver, close the app and restart it.
Copy link to clipboard
Copied
That is what I thought too. So I have cleared all my browsers cached data & history several times. I have closed out dreamweaver and reboot the pc a couple of times. Still same result.
Copy link to clipboard
Copied
Open index.html and contact.html
Copy and paste top portion of code above the <body> tag. I want to see if they are both referencing the same Template.dwt and styles.
Also, .body_pattern is merely a class name. It carries less importance than the parent selector <body> or an #ID. So there may be conflicting styles elsewhere in your site.
Copy link to clipboard
Copied
Did you upload the new CSS file?
Is your index.html page using the same CSS and Template.dwt as other child pages?
Copy link to clipboard
Copied
Yes. they all have the same code before the body.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The answer lies in your code. Unfortunately we are not privy to your code until you supply a URL to your site.
Copy link to clipboard
Copied
I don’t have it published yet as I didn’t want to take the old website down until this one was finished. What is the best way to get you the code?
Copy link to clipboard
Copied
I don’t have it published yet as I didn’t want to take the old website down until this one was finished. What is the best way to get you the code?
By @Melinda27986979mqp5
Just create a folder on your remote server where your current website exists, upload the files to that folder and provide a link to the file within the newly created folder. Obviously upload any supporting files into the folder as well, like css, image folder etc, basically any files that you have in your local version of the website. Once the problem is established you can delete the folder from your remote server.
Copy link to clipboard
Copied
I have moved a copy to my onedrive, here is the link
Copy link to clipboard
Copied
Change as shown
Copy link to clipboard
Copied
Bingo. It worked. Thank you.