Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Background Colour Switching

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27618
    ssor
    Member

    Hello,

    I’d like to try switching the background colour of my blog on each visit automatically, ala tweetCC.

    I have the following script, placed it in the header.php of my WordPress theme folder but its not calling the colours.

    Code:
    #69608
    Argeaux
    Participant

    Do you have the class names it gives to the body element in your css file?

    For example <body class="bg-color-340d0e">. If you havent got that class in your css file nothing will happen ofcourse.

    #69624
    ssor
    Member

    Ahhh, that would be it. Thanks Argeaux.

    EDIT:

    Not quite there, I can get the background switching two colours and default to white… This is my CSS:

    Code:
    body {
    background: #f1eedd;
    color: #000;
    text-align: center;
    }

    .bg-color- {
    background: #f8dcef;
    background: #b2e5de;
    }

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.