body { background-color: rgb(215, 213, 213); } .parent { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; } .main { margin: 5px; display: flex; height: 500px; width: 400px; background-color: rgb(255, 255, 255); }
Document
p.s снизу все скрины коды и пример