.people-container { display: flex; flex-direction: row; } .random-person { margin: 8px; flex-basis: 25%; flex-grow: 1; flex-shrink: 0; border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.05); } .random-person h2 { font-size: 16px; text-align: center; padding: 8px; }