Hey folks,
Struggling to figure this out, tried doing the below in flexbox to no success and now trying with grid. I am trying to have the icons equally lined up and the text aligned to the right without the text pushing the icons out of line.
<script src="https://kit.fontawesome.com/23a8029d38.js" crossorigin="anonymous"></script>
<div class="hero">
<div class="hero container">
<div class="section">
<h1 class="hero-title">Just some random filler text here</h1>
<ul>
<li><i class="fa-solid fa-pen-ruler"></i> Planning & Design</li>
<li><i class="fa-solid fa-wind"></i> Commercial Ventilation</li>
<li><i class="fa-solid fa-toolbox"></i> Expert Installation</li>
<li><i class="fa-solid fa-building-circle-check"></i> Council Approval Support</li>
</ul>
Request A Quote Btn Here
</div>
<div class="hero section">
Image Slider Here</div>
</div>
</div>
/* CSS RESETS */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
li {
list-style-type: none;
}
body {
background: #999;
font-family: 'Quicksand', sans-serif;
}
.container {
max-width: 80rem;
margin: 0 auto;
padding: 0;
}
.hero {
background-color: #ecf0f1;
min-height: 25rem;
text-align: center;
}
.hero .container {
display: grid;
grid-template-columns: repeat(2, 1fr);
border: 2px solid red;
}
.hero-title {
font-weight: 400;
text-transform: uppercase;
font-size: 1.8rem;
}
.hero li {
font-size: 1.2rem;
}
.hero i {
font-size: 3rem;
vertical-align: middle;
}
.hero .section {
display: grid;
align-items: center;
justify-items: center;
padding: 1rem;
}
.icons {
display: grid;
grid-template-columns: repeat(2, 1fr);
}