physicsboy
physicsboy

Reputation: 6316

mat-card is not responsive in div - Angular/material

Is there any way in which I can have multiple small paper-cards displayed within a div such that they wrap around the container they are in?

Upvotes: 1

Views: 10021

Answers (1)

davecar21
davecar21

Reputation: 2674

You can try this

add flex-flow: row wrap; (flex-flow: <‘flex-direction’> || <‘flex-wrap’>)

then display: inline-flex; this will make the container width equal to the content size.

.flex-me {
  display: inline-flex;
  flex-flow: row wrap;
  background: grey;
}

mat-card {
  height: 150px;
  width: 200px;
}

Hope this helps.

Upvotes: 1

Related Questions