• Skip to main content
  • Skip to forum navigation

StudioPress

  • Create a Site
  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Discussion
  • Design Tips
  • Showcase/Feedback
  • FAQs
  • Forum Rules
  • Forum Log In

Atomic Blocks Update – Advanced Post Grid!

Atomic Blocks, our leading Gutenberg blocks plugin, has just received a fantastic new update – an all new, powerful, post grid!

Read More

Force Child %100 Width Outside Parent DIV Metro Pro

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 › Design Tips and Tricks › Force Child %100 Width Outside Parent DIV Metro Pro

This topic is: not resolved

Tagged: 100% width, Div, Metro Pro, parent

This topic contains 3 replies, has 2 voices, and was last updated by  ScottFromPA 4 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • June 15, 2015 at 3:36 pm #156307

    ScottFromPA
    Participant

    What's up guys,

    My goal is to have a 100% DIV that stretches to the edge of the browser. I'm going to place a slideshow inside this div. I'm using Metro Pro and I've created a new widget in the genesis_before_content action hook.

    How can I make this new widget full width outside the parent div?

    Here's my beta.

    The feed back I'm getting from stackoverflow.com is that a css approach is not compliant.

    http://www.gridviper.com/linguistics/
    June 16, 2015 at 2:21 am #156369

    Tony @ AlphaBlossom
    Participant

    Do you just want it to extend to the edge of the site-container? If so, you can do something like this:

    
    .new-widget {
      padding: 0 50px;
      margin: 0 -50px;
      background-color: gray;
    }
    

    You can use larger numbers if you need to (responsive adjustments, etc).

    Not sure why it wouldn't be compliant, but I may be missing something there. If you're worried about that, you can use genesis_after_header, with a priority that comes after the nav and position it before/outside of the .site-inner div.

    Hope that helps!


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    June 16, 2015 at 6:46 am #156381

    ScottFromPA
    Participant

    Hmm.... I tried negative margins / padding and it did not work. Check it out, here's what I'm trying to accomplish.

    http://www.gridviper.com/linguistics/0-wide-outside-parent-div/

    June 16, 2015 at 6:59 am #156386

    ScottFromPA
    Participant

    Got it!

    The solution is to define the position as absolute.

    Below is what works.

    .new-widget { 
              width:100%; /* defines full width */
              position:absolute; /* bounces the div outside of the parent */
           }

    The only downside is that it does not push the other DIVs down. It's rides on top of them because of the absolute declaration. It's no biggie I can account for that.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

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