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
  • 346,931
  • 104
  • 581
  • 701
relidon
  • 2,142
  • 4
  • 21
  • 37

0 Answers0