Web Analytics Made Easy -
StatCounter Background Color Won't Hold from Preview to Update Page - CodingForum

Announcement

Collapse
No announcement yet.

Background Color Won't Hold from Preview to Update Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Background Color Won't Hold from Preview to Update Page

    Hello everyone.

    Although I'm getting on in life I'm very much a noob when it comes to HTML and websites.

    To cut a long story short I volunteered to become the webmaster for a charity in England that rescues war memorials from vandalism, theft or other loss.

    We have a free website theme/template provided by a comms company which I'm now finding has limitations as my HTML knowledge is expanding.

    We currently have a plain white background which I would like to change. I have set up a practice page for me to muck about on and the code I am using is as follows:

    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body style="background-color: #ffffff;">
    <br />
    <h1>Welcome to the site editor</h1>
    <p>Each different section of the page can be edited by clicking the 'Edit' button. Changes can be saved by clicking any of the save buttons located within the edit area, or on the ribbon at the top of the page.</p>
    <p>Further help can be reached by placing your mouse pointer over the <img alt="" width="16px" height="16px" src="/Images/help.png" /> buttons. A dedicated help section is also provided and accessed through the main site.</p>
    </body>
    </html>

    The problem I have is that each time I change the #ffffff to, say, #fae7a0 it shows up fine on the preview page but then reverts to #ffffff when I try and update the page.

    Any help would be fantastic as I've spent hours on sites like W3 and tried all manner of code permutations to no avail.

    Many thanks.

  • #2
    If your using the code you show, the color should not change. Make sure your uploading this code and that the code is titled index.html. There should only be one page on your website and index.html should be it's name.

    By the way stay away from inline styling. Use this:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <style>
    body {
    	background-color: #fae7a0;
    }
    </style>
    </head>
    <body>
    <h1>Welcome to the site editor</h1>
    <p>Each different section of the page can be edited by clicking the 'Edit' button. Changes can be saved by clicking any of the save buttons located within the edit area, or on the ribbon at the top of the page.</p>
    <p>Further help can be reached by placing your mouse pointer over the <img alt="" width="16px" height="16px" src="/Images/help.png" /> buttons. A dedicated help section is also provided and accessed through the main site.</p>
    </body>
    </html>
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

    Comment


    • #3
      If it is reverting back then you are probably looking at a cached copy of the page rather than the latest version - try refreshing the page.
      Stephen
      Learn Modern JavaScript - http://javascriptexample.net/
      Helping others to solve their computer problem at http://www.felgall.com/

      Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

      Comment


      • #4
        Originally posted by felgall View Post
        If it is reverting back then you are probably looking at a cached copy of the page rather than the latest version - try refreshing the page.
        Thanks for your suggestion. Tried it but "no dice" I'm afraid.

        Comment


        • #5
          Originally posted by sunfighter View Post
          If your using the code you show, the color should not change. Make sure your uploading this code and that the code is titled index.html. There should only be one page on your website and index.html should be it's name.

          By the way stay away from inline styling. Use this:
          Code:
          <!DOCTYPE html>
          <html>
          <head>
          <style>
          body {
          	background-color: #fae7a0;
          }
          </style>
          </head>
          <body>
          <h1>Welcome to the site editor</h1>
          <p>Each different section of the page can be edited by clicking the 'Edit' button. Changes can be saved by clicking any of the save buttons located within the edit area, or on the ribbon at the top of the page.</p>
          <p>Further help can be reached by placing your mouse pointer over the <img alt="" width="16px" height="16px" src="/Images/help.png" /> buttons. A dedicated help section is also provided and accessed through the main site.</p>
          </body>
          </html>
          Cheers for your reply fella. This didn't work either. Do you think that it might be something to do with the fact that it's a 'freebie' website e.g. I can't edit the banner?

          Comment

          Working...
          X