Kevin Powell - CommunityKP-C
Kevin Powell - Communityβ€’3y agoβ€’
14 replies
Mr.Sushi

Creating two row with grid!

Hello everyone! I would like to get some help with a problem that I have with grid.
My content is pushed from the left side and for some reason I can't find a solution to have two rows in the middle.
      <style jsx>{`
        .recipe-list {
          display: grid;
          grid-template-columns: 1fr 1fr;
          grid-gap: 20px 60px;
        }
      `}</style>


The global.css
body {
  background: #F4E640;
  margin: 0;
  font-family: 'Roboto';
  font-size: 1.5em;
}
.layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
header {
  text-align: center;
  margin: 60px 0;
}
header a {
  text-decoration: none;
  color: black;
  text-transform: uppercase;
  display: inline-block;
}
header h1, header h2 {
  margin: 0;
}
header span {
  display: block;
  line-height: 1em;
}
header span:first-child {
  font-size: 1em;
  font-weight: 400;
}
header span:last-child {
  font-size: 1.5em;
  font-weight: 800;
}
header h2 {
  font-size: 1.2em;
  font-weight: 400;
}
footer {
  background: #111;
  color: #bbb;
  padding: 40px;
  text-align: center;
  margin-top: auto
}
.page-content {
  max-width: 1200px;
  margin: 20px auto 80px;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

I think I have a problem with the .page-content
gridprob.png
Was this page helpful?