• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Nested CSS for Page IDs?

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Nested CSS for Page IDs?

This topic is: not resolved

Tagged: nested css, page ids

  • This topic has 4 replies, 2 voices, and was last updated 6 years, 3 months ago by RavenManiac.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • August 27, 2019 at 11:48 am #493222
    RavenManiac
    Participant

    What's the proper way to nest CSS for specific pages? Here's what I'm currently using, but I'm sure this can be simplified:

    /* LANDING PAGE MODIFICATIONS
    --------------------------------------------- */
    .page-id-4030 .site-inner {
    	background-color: White;
    	}
    
    .page-id-4030 .site-inner {
    	margin-top: 0px;
    	}
    
    August 27, 2019 at 1:02 pm #493224
    Victor Font
    Moderator

    The nesting is correct, but why not just use one set of classes?

    .page-id-4030 .site-inner {
    background-color: White;
    margin-top: 0px;
    }


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    August 27, 2019 at 1:12 pm #493225
    RavenManiac
    Participant

    How would I do that?

    August 27, 2019 at 6:14 pm #493228
    Victor Font
    Moderator

    I gave you the example above. In your original post you had to CSS blocks each with a single line of code. What I meant was consolidate your code into a single block.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    August 28, 2019 at 7:58 am #493250
    RavenManiac
    Participant

    Gotcha. Thanks, Victor.

    If I want to remove the background image from the landing page mentioned above, how would I do that? I've tried several things, but nothing works. Here's what the existing code looks like:

    body {
        background-image: url(/wp-content/uploads/2017/03/cream_paper.jpg);
    }

    I added the code above using Genesis Extender Pro to place that image on every page in the website, but I don't want it to appear on the landing page. Thanks!

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble