Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3783

    Hi,

    I would like to change the body background color only on the homepage (the one with the image slider). How can I do this?

    I have found the relevant lines in style1.css:

    body{

    color:#666;

    }

    …but if I change the color definition here, the change applies also to all other pages and I would like it to affect the homepage only. Is there a way to do it?

    Thanks!

    #43701

    Method 1: On the homepage itself, find the body tag in the code and add a manual style in there.

    e.g.

    <body style=”background-color: #000000″>


    Method 2: Add a new style to the stylesheet, e.g. .body-home{background-color: #000000}

    Then apply the new class to the body tag on the homepage itself:

    e.g.

    <body class=”body-home”>


    Dan

    #43702

    There is no “homepage itself” – it is generated by WordPress automatically and I don’t know which PHP file to modify.

    #43703

    Hey,

    use following css code (add it to style.css):

    #frontpage{
    background: #fff;
    }

    Change the color as you like.

    #43704

    Thanks!

    #43705

    Glad that I could help you :)

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘How do I change background color for the homepage only?’ is closed to new replies.