#history { .management-for-year { display : flex; flex-direction : column; .year { display : flex; flex-direction : row; justify-content : center; flex-wrap : wrap; .person { display : flex; flex-direction : column; align-items : center; margin : 0 2rem; h5 { margin-top : 0.5rem; } .img-container { height : 150px; width : 150px; display : flex; justify-content : center; align-items : center; overflow : hidden; img { height : 150px; width : auto; } } } } } } @media (max-width : 900px) { #history { h1 { font-size : 4rem; } .management-for-year { .year { flex-direction : column; .person { .img-container { height : 250px; width : 250px; img { height : 250px; width : auto; } } h5 { font-size : 2.3rem; } } } } } }