I want the first two boxes to go up with maximum width and the second box to go down with maximum width, here is the code.
This is the CSS code:
/* Start Services */ .services { padding-top: var(--section-pading); padding-bottom: var(--section-pading); } @media (min-widht: 768px) { .services .services-contianer { display: grid; grid-template-columns: repeat(auto-fill, minmax(450px, 1fr)); } } .services .box { display: flex; } .services .box i{ margin-right: 50px; } .services .box h3{ margin-bottom: 30px; color: var(--main-color); } .services .box p{ line-height: 2; } /* End Services */
This is the HTML code:
<!-- Start Services --> <div class="services"> <div class="container"> <div class="main-heading"> <h2>Services</h2> <p> Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Mauris blandit aliquet elit, eget tincidunt. </p> </div> <div class="services-container"> <div class="box"> <i class="fa-solid fa-display fa-3x"></i> <div class="text"> <h3>Vorem amet intuitive</h3> <p>Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Curabitur aliquet quam.</p> </div> </div> </div> <div class="services-container"> <div class="box"> <i class="fa-solid fa-gear fa-3x"></i> <div class="text"> <h3>Vorem amet intuitive</h3> <p>Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Curabitur aliquet quam.</p> </div> </div> </div> <div class="services-container"> <div class="box"> <i class="fa-solid fa-pen-ruler fa-3x"></i> <div class="text"> <h3>Vorem amet intuitive</h3> <p>Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Curabitur aliquet quam.</p> </div> </div> </div> <div class="services-container"> <div class="box"> <i class="fa-solid fa-camera fa-3x"></i> <div class="text"> <h3>Vorem amet intuitive</h3> <p>Curabitur arcu erat, accumsan id imperdiet et, porttitor at sem. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Curabitur aliquet quam.</p> </div> </div> </div> </div> </div> <!-- End Services -->
This is the result I get:
Enter image description here
I want the design to look like the picture below, I want 2 boxes up and 2 boxes down:
Enter image description here
Can you help?
There are some errors in adding this style in this code.
You can delete this code instead of doing this
and add this CSS code hope you can achieve your desired output
When I checked the code, there were spelling errors in the CSS code. I made some changes to the HTML code.
Misspell:
Please check the updated code below: