.allservices-section{ display: flex; flex-wrap: wrap; justify-content: space-around; margin-bottom: 20px; margin-top: 30px; justify-content: center; align-items: center; } .service-heading{ text-align: center; margin-top: 50px; font-size: 2.5em; width: 50%; margin: auto; -moz-box-shadow: 0 8px 6px -6px var(--yellow); -webkit-box-shadow: 0 8px 6px -6px var(--yellow); box-shadow: 0 8px 6px -6px var(--yellow); } .allservices-section article { margin-bottom: 40px; margin: 20px; padding: 20px; flex: 0 1 40%; -moz-box-shadow: 0 8px 6px -6px var(--yellow); -webkit-box-shadow: 0 8px 6px -6px var(--yellow); box-shadow: 0 8px 6px -6px var(--yellow); text-align: center; } .allservices-section .heading2 { text-align: center; font-size: 1.5em; margin-top: 20px; } .service-content{ text-align: left !important; } @media only screen and (max-width: 900px) { .service-heading { font-size: 1.5em; margin-top: 90px; } .allservices-section .heading2 { font-size: 1.2em; } .allservices-section article { flex: 0 1 80%; } }