h1,h2, p { text-align: center; } .container { display: flex; flex-wrap: wrap; justify-content: center; } img { width: 400px; margin: 30px; transition: all 1s; display: block; margin-left: auto; margin-right: auto; } img:hover{ transform: scale(1.1); }