I am currently learning HTML and CSS and experimenting with building a website. My goal is to have 4 boxes aligned next to each other, similar to a navigation bar, but with box items. Here is the code for these boxes:
HTML:
<section class="boxes">
<div class ="box">
<i class="fas fa-chart-pie fa-4x"></i>
<h3>Analytics</h3>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p>
<div class ="box">
<i class="fas fa-globe fa-4x"></i>
<h3>Marketing</h3>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p>
</div>
<div class ="box">
<i class="fas fa-cog fa-4x"></i>
<h3>Development</h3>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p>
</div>
<div class ="box">
<i class="fas fa-users fa-4x"></i>
<h3>Support</h3>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit.</p>
</div>
</div>
CSS:
.boxes{
display:grid;
grid-gap:20px;
grid-template-columns:repeat(4,1fr);
}
However, I'm facing an issue where the grids are not aligning side by side and appearing vertically instead. Can anyone provide guidance on how to fix this issue?