How do I add an icon using Font Awesome, or other means, to a list item on the right, as shown?
I have 4 sections of text to the right, and I would like to convert them into an expandable dropdown. I am trying to add an arrow that points down (<i class="fa-light fa-arrow-down"></i>
) from Font Awesome, however, I cannot get the arrow to appear.
.container-fluid {
display: flex;
align-items: center;
justify-content: space-between;
height: 30vw;
background-image: url(pictures/output-onlinepngtools.png);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
word-break: keep-all;
border: 2px solid rgb(68, 115, 216);
padding-left: 20px;
padding-right: 100px;
}
.container-fluid h1 {
margin: 0;
line-height: calc(30vw / 3);
}
.sec2drop li {
list-style: none;
border-top: 1px solid rgb(161, 159, 159);
line-height: 50px;
}
<div class="container-fluid">
<div class="sec3">
<ul class="sec2drop">
<li>
<i class="fa-light fa-arrow-down"></i> Prepare for a language exam
</li>
<li>Hungarian for kids</li>
<li>Take on a challenge</li>
<li>Translation services</li>
</ul>
</div>
</div>
2
Answers
Please check your font-awesome css file path and font-faces that linked in css file.
Then copy and paste this code:
My first suggestion would be to avoid the use of icon fonts and simply use native HTML elements where they exist, styled appropriately with CSS, as shown below:
JS Fiddle demo.
This can, of course, be further styled:
JS Fiddle demo.
References:
:first-child
.::marker
.:not()
.<details>
.<summary>
.Bibliography: