.main-container { display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: center; text-align: center; } .plot-container { display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; } .plot-item { flex: 0 1 33% } .img-bars { width: 1500px; height: 500px; border: solid } img { width: 100%; height: 100%; object-fit: contain; }