• 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

Wrap .site-inner inside a new div

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 › Design Tips and Tricks › Wrap .site-inner inside a new div

This topic is: not resolved

Tagged: class, Div, inner-div, structure, wrapper

  • This topic has 10 replies, 2 voices, and was last updated 12 years, 8 months ago by Susan Nelson.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • November 9, 2013 at 7:12 pm #71923
    northk
    Member

    Greetings all,

    I'm coming up to speed on Genesis. I want to wrap the <div class="site-inner"> wrapper in the Genesis Sample child theme with my own full-width wrapper, so it looks like this:

    <div class="myclass">
      <div class="site-inner">
      </div>
    </div>
    

    I've read several tutorials and I feel comfortable making changes in functions.php but I'm having trouble getting this right. Your help would be appreciated. The purpose is so I can include a background image that is full-width, but begins below the header and navigation.

    Thanks!

    http://www.highintegritydesign.com/
    November 10, 2013 at 8:36 am #72013
    Susan Nelson
    Participant

    Hello!

    You could use this in your functions.php file to add structural wraps: http://my.studiopress.com/snippets/structural-wraps/

    The markup would look something like this:

    <div class="site-inner">
        <div class="wrap">
        </div>
    </div>

    Let me know if that doesn't work for you.

    November 10, 2013 at 11:12 am #72051
    northk
    Member

    Hi Susan,

    Thanks for writing back. What I'd like to do is a little different-- the <div class="wrap"> should enclose the <div class="site-inner">, rather than the other way around. I've read the Genesis tutorials and tried the structural wraps code, but it doesn't seem to cover this scenario.

    Any ideas?

    Thanks.

    November 10, 2013 at 11:20 am #72055
    Susan Nelson
    Participant

    Hmmm...can you just change your .myclass to .site-inner and then use .wrap as you were planning to use .site-inner? It accomplishes the same thing just using different class names. Otherwise, I don't know of a way to do what you want. Sorry about that!

    November 10, 2013 at 11:31 am #72061
    northk
    Member

    Also it looks like I might need to generate my own class name since .wrap is already being used for other purposes.

    Thanks.

    November 10, 2013 at 11:38 am #72072
    northk
    Member

    Susan, I thought about doing what you are suggesting-- basically apply all the styles used by .site-inner into .wrap, and then apply my own CSS to .site-inner. But the problem is that both .site-inner and .wrap have a lot of css applied in the Genesis Sample style sheet already, including in the media queries. And .wrap is used in other places in the theme.

    So I think it might be pretty complicated to do this. I was hoping a simpler solution. Thanks though. Does anyone else know a way to generate my own wrapper code as I'm proposing?

    Thanks.

    November 10, 2013 at 11:56 am #72078
    Susan Nelson
    Participant

    You could use .site-inner for your main background image and then .site-inner .wrap for the inside part. As long as you put .site-inner in front of .wrap, it won't affect the other .wraps in the theme.

    So, your CSS might look like this:

    .site-inner {
        background: url(images/yourimage.png);
    }
    
    .site-inner .wrap {
        background-color: #fff;
    }

    It works. I just did it with the Minimum Pro theme. 🙂

    November 10, 2013 at 11:57 am #72079
    Susan Nelson
    Participant

    And the HTML would look like this:

    <div class="site-inner">
        <div class="wrap">
        </div>
    </div>
    November 10, 2013 at 12:11 pm #72083
    northk
    Member

    Susan, thanks I'll try that!
    -NorthK

    November 10, 2013 at 12:37 pm #72086
    northk
    Member

    Susan, it works! (of course you knew that 🙂 Thanks so much. I should have thought of doing it that way, but I got stuck thinking there was only one way to solve the problem. Only change I made was to make the background color transparent for .wrap:

    @media only screen and (min-width: 1024px) {
    	.site-inner {
    		max-width: 100%;
    		background-image: url(images/body-background-2.jpg);
    		background-repeat: no-repeat;
    		background-position: right top; 
    	}
    	.site-inner .wrap {
    		background: transparent;
    	}
    }
    

    Thanks again!
    -NorthK

    November 10, 2013 at 12:47 pm #72088
    Susan Nelson
    Participant

    You're welcome! I'm glad I could help. 🙂

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The forum ‘Design Tips and Tricks’ 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

© 2026 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