WordPress.org

Ready to get started?Download WordPress

Forums

Changing Container Color on Homepage Only (2 posts)

  1. matt84532
    Member
    Posted 8 months ago #

    I'm trying to hide the article container on my homepage here:

    http://www.wabi.dreamhosters.com/

    As you can see, when the article is left blank, it creates a white line where the container would be. This is because I have the body set to green and the container set to white, which I want site-wide but not on the homepage.

    The easiest thing to do would be to make the background of the homepage container green, but I'm not sure of the precise syntax to do so.

    The relevant CSS already in use is:

    .container[role="main"] {
    background-color: white;
    }

    How would I modify that CSS to apply to only the home page (or page2)?

    It seems to me that something like

    home.container[role="main"] {
    background-color: #99CC33;
    }

    should work but doesn't.

    I don't understand the correct syntax, but know it should be possible.

    Thanks in advance for any help.

  2. esmi
    Forum Moderator
    Posted 8 months ago #

Reply

You must log in to post.

About this Topic