I'm trying to create a sticky/fixed left column within an overall 2-column layout. Because there is content above, the sticky element needs to be within a parent container (vs. relative to the viewport/entire page).

[Here is a Codepen with what I have so far](https://codepen.io/devin1229/pen/MWoJzMO).

**The Issue:**

Even though I have specified the column width, the sticky content can overflow into the other column. The other issue I have is that this does not appear to be responsive — the sticky still overflows into the main column.

Is there any way to have a sticky/fixed element within a parent container?

```
.main-container {
  width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 10% auto;
}

@media all and (max-width: 800px) {
  .main-container {
    grid-template-columns: 100%;
    grid-template-rows: 30% auto;
  }
}

.sticky {
  position: fixed;
  margin-left: 30px;
  margin-right: 30px;
}

```

```
<p>I'm baby twee locavore try-hard glossier drinking vinegar. Next level keytar chicharrones XOXO vinyl meggings whatever. Four loko brunch poke kombucha, green juice selvage poutine fam polaroid kitsch gochujang vape. Biodiesel semiotics af kinfolk, lo-fi 90's iceland kale chips lomo crucifix direct trade taiyaki blog. Leggings irony af lo-fi trust fund hammock vegan tofu everyday carry organic schlitz farm-to-table truffaut echo park. Tumblr sustainable roof party messenger bag.

  3 wolf moon readymade seitan venmo, beard VHS blue bottle thundercats irony poutine lumbersexual ennui normcore pok pok. +1 lomo green juice, succulents palo santo live-edge meggings selvage normcore polaroid humblebrag iceland pinterest organic VHS. Wayfarers hella fam, bespoke ennui freegan post-ironic bicycle rights put a bird on it cloud bread. Beard neutra four dollar toast butcher, readymade kale chips viral chicharrones cred blue bottle skateboard.</p>

<div class="main-container">
  <div class="left-nav">
    <div class="sticky">
      <div class="sticky-stuff">
        Sticky Stuff
      </div>
    </div>
  </div>
  <div class="main-content">
    I'm baby keffiyeh art party chambray enamel pin, narwhal skateboard fixie trust fund selvage tacos squid pork belly actually. Lumbersexual mustache coloring book narwhal. Selvage vape flexitarian polaroid synth post-ironic. Single-origin coffee intelligentsia snackwave humblebrag blue bottle before they sold out. Occupy iPhone pug hexagon pitchfork cliche chillwave gastropub shabby chic lomo mumblecore hammock ethical XOXO green juice. Sustainable thundercats narwhal forage cred humblebrag.

    Selvage bitters chia, godard mumblecore mixtape disrupt la croix williamsburg banjo. Offal listicle plaid lyft four dollar toast roof party chartreuse cronut disrupt shaman poutine copper mug. Fanny pack pickled tacos wolf cliche food truck sartorial leggings art party. Ugh mlkshk vaporware roof party deep v cray ramps ethical cold-pressed lyft bespoke raclette selfies la croix narwhal. Kale chips sriracha pinterest vinyl man braid yuccie lumbersexual kitsch vexillologist. Semiotics tilde affogato chia, 8-bit roof party pug succulents mustache iceland pok pok. Celiac palo santo +1, keytar fashion axe PBR&B mlkshk copper mug poutine ethical keffiyeh iceland kombucha venmo.

    Cliche chartreuse asymmetrical keytar post-ironic. Keffiyeh taxidermy pop-up biodiesel tacos four dollar toast, PBR&B church-key raw denim pork belly vice normcore hoodie meh small batch. Portland you probably haven't heard of them whatever pinterest YOLO man bun tote bag glossier coloring book kitsch mumblecore tacos. Salvia blue bottle flannel +1 la croix lyft leggings. Swag bicycle rights tote bag pug crucifix.

    Unicorn neutra squid yuccie, echo park celiac subway tile kinfolk bicycle rights activated charcoal succulents pitchfork. Pour-over +1 wayfarers, affogato humblebrag hoodie whatever actually tilde iceland swag trust fund 8-bit. Selfies tumblr gentrify biodiesel, irony echo park swag tbh lomo. Sriracha organic hashtag kickstarter four dollar toast lomo mumblecore chia brooklyn dreamcatcher disrupt authentic pitchfork bicycle rights. Humblebrag gluten-free raw denim leggings activated charcoal fingerstache venmo DIY vinyl organic ramps selfies. VHS intelligentsia blue bottle, shoreditch 8-bit artisan art party iPhone tattooed banjo cray master cleanse tousled bicycle rights.

    Biodiesel raw denim pop-up waistcoat hell of food truck, deep v helvetica roof party gentrify organic vape pinterest. Pabst cliche green juice lyft. Letterpress chartreuse cray, edison bulb thundercats cloud bread vegan small batch biodiesel bicycle rights gluten-free banh mi enamel pin four loko art party. Lyft prism flannel, brooklyn raw denim pok pok pitchfork. Lumbersexual etsy poutine unicorn. Plaid PBR&B umami tote bag, williamsburg celiac bushwick XOXO sartorial listicle pickled chambray pitchfork kombucha. Biodiesel before they sold out pinterest pok pok venmo, waistcoat quinoa.

    Pour-over street art four dollar toast semiotics 3 wolf moon mixtape small batch DIY la croix heirloom aesthetic. Poke shabby chic church-key, cold-pressed freegan fashion axe bitters raclette chartreuse fam cronut pabst meh kogi. Sriracha activated charcoal iceland farm-to-table vaporware small batch viral church-key 8-bit vegan single-origin coffee keytar palo santo. Four dollar toast yr austin lyft cronut DIY knausgaard everyday carry cardigan cloud bread. Pickled four dollar toast prism hoodie trust fund cornhole forage tumeric unicorn coloring book locavore jianbing jean shorts gluten-free adaptogen. Gochujang vape before they sold out man braid pop-up cornhole taxidermy affogato hexagon. Lo-fi tumblr meditation cloud bread distillery cardigan pickled gluten-free.

    Normcore fam +1 direct trade PBR&B cornhole hammock pour-over distillery ugh waistcoat thundercats tacos cronut. Readymade four dollar toast shaman subway tile YOLO. Fashion axe aesthetic tote bag swag twee. Vegan pug fam single-origin coffee craft beer williamsburg hammock listicle man bun pour-over.

    Enamel pin wolf chartreuse, poutine gochujang banjo marfa waistcoat tacos franzen tousled pug af. Ennui authentic deep v hot chicken thundercats, williamsburg man braid raclette brooklyn. Street art you probably haven't heard of them vape master cleanse pinterest post-ironic. Fashion axe disrupt echo park next level. Asymmetrical unicorn taiyaki, ramps small batch try-hard cred.

    Tousled plaid photo booth activated charcoal. Small batch meh lo-fi migas tumeric irony street art subway tile mixtape typewriter ugh marfa banjo fingerstache. Vape austin squid palo santo, portland raw denim PBR&B slow-carb letterpress jean shorts. Stumptown franzen sustainable gluten-free keytar YOLO. Chicharrones copper mug pinterest cronut, ennui portland flexitarian asymmetrical wayfarers chartreuse seitan gentrify.

    I'm baby keffiyeh art party chambray enamel pin, narwhal skateboard fixie trust fund selvage tacos squid pork belly actually. Lumbersexual mustache coloring book narwhal. Selvage vape flexitarian polaroid synth post-ironic. Single-origin coffee intelligentsia snackwave humblebrag blue bottle before they sold out. Occupy iPhone pug hexagon pitchfork cliche chillwave gastropub shabby chic lomo mumblecore hammock ethical XOXO green juice. Sustainable thundercats narwhal forage cred humblebrag.

    Selvage bitters chia, godard mumblecore mixtape disrupt la croix williamsburg banjo. Offal listicle plaid lyft four dollar toast roof party chartreuse cronut disrupt shaman poutine copper mug. Fanny pack pickled tacos wolf cliche food truck sartorial leggings art party. Ugh mlkshk vaporware roof party deep v cray ramps ethical cold-pressed lyft bespoke raclette selfies la croix narwhal. Kale chips sriracha pinterest vinyl man braid yuccie lumbersexual kitsch vexillologist. Semiotics tilde affogato chia, 8-bit roof party pug succulents mustache iceland pok pok. Celiac palo santo +1, keytar fashion axe PBR&B mlkshk copper mug poutine ethical keffiyeh iceland kombucha venmo.

    Cliche chartreuse asymmetrical keytar post-ironic. Keffiyeh taxidermy pop-up biodiesel tacos four dollar toast, PBR&B church-key raw denim pork belly vice normcore hoodie meh small batch. Portland you probably haven't heard of them whatever pinterest YOLO man bun tote bag glossier coloring book kitsch mumblecore tacos. Salvia blue bottle flannel +1 la croix lyft leggings. Swag bicycle rights tote bag pug crucifix.

    Unicorn neutra squid yuccie, echo park celiac subway tile kinfolk bicycle rights activated charcoal succulents pitchfork. Pour-over +1 wayfarers, affogato humblebrag hoodie whatever actually tilde iceland swag trust fund 8-bit. Selfies tumblr gentrify biodiesel, irony echo park swag tbh lomo. Sriracha organic hashtag kickstarter four dollar toast lomo mumblecore chia brooklyn dreamcatcher disrupt authentic pitchfork bicycle rights. Humblebrag gluten-free raw denim leggings activated charcoal fingerstache venmo DIY vinyl organic ramps selfies. VHS intelligentsia blue bottle, shoreditch 8-bit artisan art party iPhone tattooed banjo cray master cleanse tousled bicycle rights.

    Biodiesel raw denim pop-up waistcoat hell of food truck, deep v helvetica roof party gentrify organic vape pinterest. Pabst cliche green juice lyft. Letterpress chartreuse cray, edison bulb thundercats cloud bread vegan small batch biodiesel bicycle rights gluten-free banh mi enamel pin four loko art party. Lyft prism flannel, brooklyn raw denim pok pok pitchfork. Lumbersexual etsy poutine unicorn. Plaid PBR&B umami tote bag, williamsburg celiac bushwick XOXO sartorial listicle pickled chambray pitchfork kombucha. Biodiesel before they sold out pinterest pok pok venmo, waistcoat quinoa.

    Pour-over street art four dollar toast semiotics 3 wolf moon mixtape small batch DIY la croix heirloom aesthetic. Poke shabby chic church-key, cold-pressed freegan fashion axe bitters raclette chartreuse fam cronut pabst meh kogi. Sriracha activated charcoal iceland farm-to-table vaporware small batch viral church-key 8-bit vegan single-origin coffee keytar palo santo. Four dollar toast yr austin lyft cronut DIY knausgaard everyday carry cardigan cloud bread. Pickled four dollar toast prism hoodie trust fund cornhole forage tumeric unicorn coloring book locavore jianbing jean shorts gluten-free adaptogen. Gochujang vape before they sold out man braid pop-up cornhole taxidermy affogato hexagon. Lo-fi tumblr meditation cloud bread distillery cardigan pickled gluten-free.

    Normcore fam +1 direct trade PBR&B cornhole hammock pour-over distillery ugh waistcoat thundercats tacos cronut. Readymade four dollar toast shaman subway tile YOLO. Fashion axe aesthetic tote bag swag twee. Vegan pug fam single-origin coffee craft beer williamsburg hammock listicle man bun pour-over.

    Enamel pin wolf chartreuse, poutine gochujang banjo marfa waistcoat tacos franzen tousled pug af. Ennui authentic deep v hot chicken thundercats, williamsburg man braid raclette brooklyn. Street art you probably haven't heard of them vape master cleanse pinterest post-ironic. Fashion axe disrupt echo park next level. Asymmetrical unicorn taiyaki, ramps small batch try-hard cred.

    Tousled plaid photo booth activated charcoal. Small batch meh lo-fi migas tumeric irony street art subway tile mixtape typewriter ugh marfa banjo fingerstache. Vape austin squid palo santo, portland raw denim PBR&B slow-carb letterpress jean shorts. Stumptown franzen sustainable gluten-free keytar YOLO. Chicharrones copper mug pinterest cronut, ennui portland flexitarian asymmetrical wayfarers chartreuse seitan gentrify.

    I'm baby keffiyeh art party chambray enamel pin, narwhal skateboard fixie trust fund selvage tacos squid pork belly actually. Lumbersexual mustache coloring book narwhal. Selvage vape flexitarian polaroid synth post-ironic. Single-origin coffee intelligentsia snackwave humblebrag blue bottle before they sold out. Occupy iPhone pug hexagon pitchfork cliche chillwave gastropub shabby chic lomo mumblecore hammock ethical XOXO green juice. Sustainable thundercats narwhal forage cred humblebrag.

    Selvage bitters chia, godard mumblecore mixtape disrupt la croix williamsburg banjo. Offal listicle plaid lyft four dollar toast roof party chartreuse cronut disrupt shaman poutine copper mug. Fanny pack pickled tacos wolf cliche food truck sartorial leggings art party. Ugh mlkshk vaporware roof party deep v cray ramps ethical cold-pressed lyft bespoke raclette selfies la croix narwhal. Kale chips sriracha pinterest vinyl man braid yuccie lumbersexual kitsch vexillologist. Semiotics tilde affogato chia, 8-bit roof party pug succulents mustache iceland pok pok. Celiac palo santo +1, keytar fashion axe PBR&B mlkshk copper mug poutine ethical keffiyeh iceland kombucha venmo.

    Cliche chartreuse asymmetrical keytar post-ironic. Keffiyeh taxidermy pop-up biodiesel tacos four dollar toast, PBR&B church-key raw denim pork belly vice normcore hoodie meh small batch. Portland you probably haven't heard of them whatever pinterest YOLO man bun tote bag glossier coloring book kitsch mumblecore tacos. Salvia blue bottle flannel +1 la croix lyft leggings. Swag bicycle rights tote bag pug crucifix.

    Unicorn neutra squid yuccie, echo park celiac subway tile kinfolk bicycle rights activated charcoal succulents pitchfork. Pour-over +1 wayfarers, affogato humblebrag hoodie whatever actually tilde iceland swag trust fund 8-bit. Selfies tumblr gentrify biodiesel, irony echo park swag tbh lomo. Sriracha organic hashtag kickstarter four dollar toast lomo mumblecore chia brooklyn dreamcatcher disrupt authentic pitchfork bicycle rights. Humblebrag gluten-free raw denim leggings activated charcoal fingerstache venmo DIY vinyl organic ramps selfies. VHS intelligentsia blue bottle, shoreditch 8-bit artisan art party iPhone tattooed banjo cray master cleanse tousled bicycle rights.

    Biodiesel raw denim pop-up waistcoat hell of food truck, deep v helvetica roof party gentrify organic vape pinterest. Pabst cliche green juice lyft. Letterpress chartreuse cray, edison bulb thundercats cloud bread vegan small batch biodiesel bicycle rights gluten-free banh mi enamel pin four loko art party. Lyft prism flannel, brooklyn raw denim pok pok pitchfork. Lumbersexual etsy poutine unicorn. Plaid PBR&B umami tote bag, williamsburg celiac bushwick XOXO sartorial listicle pickled chambray pitchfork kombucha. Biodiesel before they sold out pinterest pok pok venmo, waistcoat quinoa.

    Pour-over street art four dollar toast semiotics 3 wolf moon mixtape small batch DIY la croix heirloom aesthetic. Poke shabby chic church-key, cold-pressed freegan fashion axe bitters raclette chartreuse fam cronut pabst meh kogi. Sriracha activated charcoal iceland farm-to-table vaporware small batch viral church-key 8-bit vegan single-origin coffee keytar palo santo. Four dollar toast yr austin lyft cronut DIY knausgaard everyday carry cardigan cloud bread. Pickled four dollar toast prism hoodie trust fund cornhole forage tumeric unicorn coloring book locavore jianbing jean shorts gluten-free adaptogen. Gochujang vape before they sold out man braid pop-up cornhole taxidermy affogato hexagon. Lo-fi tumblr meditation cloud bread distillery cardigan pickled gluten-free.

    Normcore fam +1 direct trade PBR&B cornhole hammock pour-over distillery ugh waistcoat thundercats tacos cronut. Readymade four dollar toast shaman subway tile YOLO. Fashion axe aesthetic tote bag swag twee. Vegan pug fam single-origin coffee craft beer williamsburg hammock listicle man bun pour-over.

    Enamel pin wolf chartreuse, poutine gochujang banjo marfa waistcoat tacos franzen tousled pug af. Ennui authentic deep v hot chicken thundercats, williamsburg man braid raclette brooklyn. Street art you probably haven't heard of them vape master cleanse pinterest post-ironic. Fashion axe disrupt echo park next level. Asymmetrical unicorn taiyaki, ramps small batch try-hard cred.

    Tousled plaid photo booth activated charcoal. Small batch meh lo-fi migas tumeric irony street art subway tile mixtape typewriter ugh marfa banjo fingerstache. Vape austin squid palo santo, portland raw denim PBR&B slow-carb letterpress jean shorts. Stumptown franzen sustainable gluten-free keytar YOLO. Chicharrones copper mug pinterest cronut, ennui portland flexitarian asymmetrical wayfarers chartreuse seitan gentrify.

    I'm baby keffiyeh art party chambray enamel pin, narwhal skateboard fixie trust fund selvage tacos squid pork belly actually. Lumbersexual mustache coloring book narwhal. Selvage vape flexitarian polaroid synth post-ironic. Single-origin coffee intelligentsia snackwave humblebrag blue bottle before they sold out. Occupy iPhone pug hexagon pitchfork cliche chillwave gastropub shabby chic lomo mumblecore hammock ethical XOXO green juice. Sustainable thundercats narwhal forage cred humblebrag.

    Selvage bitters chia, godard mumblecore mixtape disrupt la croix williamsburg banjo. Offal listicle plaid lyft four dollar toast roof party chartreuse cronut disrupt shaman poutine copper mug. Fanny pack pickled tacos wolf cliche food truck sartorial leggings art party. Ugh mlkshk vaporware roof party deep v cray ramps ethical cold-pressed lyft bespoke raclette selfies la croix narwhal. Kale chips sriracha pinterest vinyl man braid yuccie lumbersexual kitsch vexillologist. Semiotics tilde affogato chia, 8-bit roof party pug succulents mustache iceland pok pok. Celiac palo santo +1, keytar fashion axe PBR&B mlkshk copper mug poutine ethical keffiyeh iceland kombucha venmo.

    Cliche chartreuse asymmetrical keytar post-ironic. Keffiyeh taxidermy pop-up biodiesel tacos four dollar toast, PBR&B church-key raw denim pork belly vice normcore hoodie meh small batch. Portland you probably haven't heard of them whatever pinterest YOLO man bun tote bag glossier coloring book kitsch mumblecore tacos. Salvia blue bottle flannel +1 la croix lyft leggings. Swag bicycle rights tote bag pug crucifix.

    Unicorn neutra squid yuccie, echo park celiac subway tile kinfolk bicycle rights activated charcoal succulents pitchfork. Pour-over +1 wayfarers, affogato humblebrag hoodie whatever actually tilde iceland swag trust fund 8-bit. Selfies tumblr gentrify biodiesel, irony echo park swag tbh lomo. Sriracha organic hashtag kickstarter four dollar toast lomo mumblecore chia brooklyn dreamcatcher disrupt authentic pitchfork bicycle rights. Humblebrag gluten-free raw denim leggings activated charcoal fingerstache venmo DIY vinyl organic ramps selfies. VHS intelligentsia blue bottle, shoreditch 8-bit artisan art party iPhone tattooed banjo cray master cleanse tousled bicycle rights.

    Biodiesel raw denim pop-up waistcoat hell of food truck, deep v helvetica roof party gentrify organic vape pinterest. Pabst cliche green juice lyft. Letterpress chartreuse cray, edison bulb thundercats cloud bread vegan small batch biodiesel bicycle rights gluten-free banh mi enamel pin four loko art party. Lyft prism flannel, brooklyn raw denim pok pok pitchfork. Lumbersexual etsy poutine unicorn. Plaid PBR&B umami tote bag, williamsburg celiac bushwick XOXO sartorial listicle pickled chambray pitchfork kombucha. Biodiesel before they sold out pinterest pok pok venmo, waistcoat quinoa.

    Pour-over street art four dollar toast semiotics 3 wolf moon mixtape small batch DIY la croix heirloom aesthetic. Poke shabby chic church-key, cold-pressed freegan fashion axe bitters raclette chartreuse fam cronut pabst meh kogi. Sriracha activated charcoal iceland farm-to-table vaporware small batch viral church-key 8-bit vegan single-origin coffee keytar palo santo. Four dollar toast yr austin lyft cronut DIY knausgaard everyday carry cardigan cloud bread. Pickled four dollar toast prism hoodie trust fund cornhole forage tumeric unicorn coloring book locavore jianbing jean shorts gluten-free adaptogen. Gochujang vape before they sold out man braid pop-up cornhole taxidermy affogato hexagon. Lo-fi tumblr meditation cloud bread distillery cardigan pickled gluten-free.

    Normcore fam +1 direct trade PBR&B cornhole hammock pour-over distillery ugh waistcoat thundercats tacos cronut. Readymade four dollar toast shaman subway tile YOLO. Fashion axe aesthetic tote bag swag twee. Vegan pug fam single-origin coffee craft beer williamsburg hammock listicle man bun pour-over.

    Enamel pin wolf chartreuse, poutine gochujang banjo marfa waistcoat tacos franzen tousled pug af. Ennui authentic deep v hot chicken thundercats, williamsburg man braid raclette brooklyn. Street art you probably haven't heard of them vape master cleanse pinterest post-ironic. Fashion axe disrupt echo park next level. Asymmetrical unicorn taiyaki, ramps small batch try-hard cred.

    Tousled plaid photo booth activated charcoal. Small batch meh lo-fi migas tumeric irony street art subway tile mixtape typewriter ugh marfa banjo fingerstache. Vape austin squid palo santo, portland raw denim PBR&B slow-carb letterpress jean shorts. Stumptown franzen sustainable gluten-free keytar YOLO. Chicharrones copper mug pinterest cronut, ennui portland flexitarian asymmetrical wayfarers chartreuse seitan gentrify.
  </div>
</div>

```