img { max-width: 100%; max-height: 100%; object-fit: contain; } body { box-sizing: border-box; max-width: 1200px; margin: 0 auto; padding: 0.5em; } h1 { border-left: 2px solid; border-bottom: 2px solid; display: inline-block; padding: 2px 16px 2px 4px; } .content-wrapper { margin: auto auto; } .details-wrapper { display: flex; flex-wrap: wrap; justify-content: space-between; .details-logo { order: 0; flex-basis: 10%; } .details-text { order: 1; flex-basis: 70%; } .details-photo { order: 2; flex-basis: 15%; .showcase-container { display: flex; flex-direction: column; justify-content: space-around; align-items: center; .showcase-image { align-self: center; margin: 0.5em; max-width: 150px; } } } .details-contact { order: 3; flex-basis: 100%; border-top: 2px solid black; } }