0

I'm trying to create a two column layout where the left column is fixed.

In the process this is the first time I'm using css grids

.container{
  position: fixed;
  top: 0;
  display: grid;
  grid-template-columns: 38.196601125% auto; /* 61.803398875%*/
}
.main-content{
  padding: 0 100px;
  overflow-y:scroll; 
}

The HTML is

<div className="container">
  <Sidebar /> // just a div
  <div className='main-content'>
  </div>
</div>

The content bellow the fold is hidden and there's no scroll

Michael Benjamin
  • 307,417
  • 93
  • 525
  • 644
relidon
  • 1,708
  • 2
  • 19
  • 28

0 Answers0