timmy
timmy

Reputation: 15

React component: how to make sure component is below the others

Currently, my component with children looks like this: 1 My component's code:

const container = styled.div`
  display: flex;
  position: sticky;
  bottom: 40px;
  left: 40px;
  width: max-content;
`

I want to add components to the bottom of it like this: 2

How do I do so?

Upvotes: 0

Views: 897

Answers (1)

Selim Choueiter
Selim Choueiter

Reputation: 191

The best way to do this is by using display: grid in your CSS and then setting your grid-template-columns and grid-column as needed

Upvotes: 2

Related Questions