Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    May 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exclamation CSS background colour change

    Hi Everyone,

    I'm new to the Forum and new to CSS.

    A friend of mine was tearing her hair out over the background colour of a site she's writing (using something called Paper Template):

    http://peacefrequencyholders.com/

    I tried to help by looking up basic CSS tutorials online, and *thought* the black background could be changed by adding this on line 26:

    {background-color:#8FBC8F;}

    No joy

    Does anyone have any suggestions of what else to try?

    Many thanks!

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    1,990
    Thanks
    15
    Thanked 233 Times in 233 Posts
    This is a job for javascript. First find out what object has that color, the body, a div, etc. and use javascript to change it. A select box with a range of colors. You just use onchange to call a function that sets new colors.
    Welcome to http://www.myphotowizard.net

    where you can edit images, make a photo calendar, add text to images, and do much more.


    When you know what you're doing it's called Engineering, when you don't know, it's called Research and Development. And you can always charge more for Research and Development.

  • #3
    New to the CF scene
    Join Date
    May 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thanks DrDos

    Thanks DrDos,

    What I'm confused by is when into the view source page:

    view-source:http://peacefrequencyholders.com/

    I can't find the actual black colour code (#000000) anywhere, so I'm not sure it's actually been assigned to an object / div / etc. to be changed, if that makes sense?

    I've never used Javascript: how would a complete novice edit the above page using it?

    Thanks very much!

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by DrDOS View Post
    This is a job for javascript. First find out what object has that color, the body, a div, etc. and use javascript to change it. A select box with a range of colors. You just use onchange to call a function that sets new colors.
    he just wants to change the background color.

    in papertemplate-black.css

    cahnge

    Code:
    body, td {
        background-color: black;
        color: white;
        font-family: Verdana,Arial;
        font-size: 10pt;
    }
    to

    Code:
    body, td {
        background-color: #8FBC8F;
        color: white;
        font-family: Verdana,Arial;
        font-size: 10pt;
    }
    this will leav the main container in the middle blakc and your body in the desired green

  • Users who have thanked DanInMa for this post:

    Franny (06-02-2013)

  • #5
    New to the CF scene
    Join Date
    May 2013
    Location
    Cape Town, South Africa
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm not familiar with this Paper Template.

    Could you not possibly try something like:
    background-color: #8FBC8F !important; If it is being done in the javascript it should add the background-color attribute inline in the DOM. The important should override the inline style. That being said its not best practice but it should work.
    Last edited by VIPStephan; 06-01-2013 at 07:24 AM. Reason: removed link

  • #6
    New to the CF scene
    Join Date
    May 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thank you so, so much everyone!

    Hello Everyone,

    Thank you for your suggestions.

    DanInMa, my friend followed your instructions and is happy again :@)

    Have a look:

    http://peacefrequencyholders.com/

    Much appreciated!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •