Good day guys, anyone knows how to put the Web Development below of the fontawesome icon i tried display: block; but it don’t work also i tried to put another element also it don’t work i tried to add also a
element nothing work as well heres the code, also new begginer here
.section-service {
width: 80%;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
grid-auto-rows: minmax(20rem, auto);;
grid-gap: 1rem;
margin: 0 auto;
margin-top: 4rem;
}
.section-service .color-service {
display: flex;
justify-content: center;
align-items: center;
background-color: crimson;
}
.section-service p {
display: block;
}
.section-service i {
display: flex;
justify-content: center;
align-items: center;
width: 4rem;
height: 4rem;
background-color: #fff;
}
<section class="service section">
<div class="container">
<h2 class="section-title">Service</h2>
</div>
<div class="section-service">
<div class="web-dev color-service"><div><i class="fa fa-code"></i></div><p>Web Development</p></div>
<div class="web-design color-service"><p>Web Design</p></div>
<div class="wordpress color-service"><p>WordPress</p></div>
<div class="seo color-service"><p>SEO</p></div>
<div class="responsive color-service">Responsive Design</div>
<div class="learn color-service">Learn More</div>
</div>
</section>
2
Answers
The container (
.color-service
) of them areflex
. You need to set theflex-direction
of the.color-service
tocolumn
.Use flex-direction:column; property in .color-service
Please have a look attached screenshot