main { padding: 0 1rem; } .container { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; } .mainHeading { font-size: 4rem; margin: 0; } .sub-heading { font-size: 1.5rem; } .heading-color { color: #0e6c96; } .hero-img { margin-top: 100px; width: 100%; max-height: 800px; vertical-align: middle; object-fit: contain; float: left; }