WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Customizr
[resolved] How to modify style.css for Front page only (7 posts)

  1. petergmtl
    Member
    Posted 2 years ago #

    Hi,

    I have made a few changes to style.css that affect the entire site (www.3saccounting.com). How would I go about modifying style.css further so that one (or more) of the changes does not affect the Front Page?

    Thanks

    Peter

  2. salsaturation
    Member
    Posted 2 years ago #

    Hi Peter

    You can use

    body.home

    Infront of the css code eg

    body.home .some-div {
    display: none;
    }

    Also you can do something like this

    body:not(.home) .some-div {
    display: none;
    }

    to affect everything other than the home

  3. Andrew Nevins
    Forum moderator
    Posted 2 years ago #

    You're referring to your Child Theme style.css file?

  4. petergmtl
    Member
    Posted 2 years ago #

    @Andrew - yes, Child Theme - forgot to mention that.

    @salsaturation - thanks, I'll give your suggestion a try.

    Cheers

    Peter

  5. petergmtl
    Member
    Posted 2 years ago #

    @salsaturation

    Your suggestion worked - thanks! You saved me a lot of time.

    Peter

  6. salsaturation
    Member
    Posted 2 years ago #

    You're welcome.

  7. ElectricFeet
    Member
    Posted 2 years ago #

    @salsaturation Neat! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic