# Font-awesome li:before

**URL:** https://forum.pinegrow.com/t/font-awesome-li-before/6200
**Category:** Beginners
**Created:** [January 30, 2022, 9:15pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200 "2022-01-30T21:15:49Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [January 30, 2022, 9:15pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/1 "2022-01-30T21:15:49Z")

</div>

I want the existing font-awesome i within each li now to be a :before.  
How do get the find the fa icon within PG? My css is below the html.

```auto
<div class="pricing-box"><span class="price">Choose Your Option</span>
    <h2>Tax Deductions</h2>
    <ul>
        <li>
            <i class="fa-arrow-alt-circle-right far"></i>Once-a-year membership donation.
        </li>
        <li>
            <i class="fa-arrow-alt-circle-right far"></i> of a particular Poetry.LA series or a single episode for screen credit:
        </li>
        <ul>
            <li>
                <i class="fa-hand-point-right far"></i>PPoetry.LA Interview Series hosted by Mariano Zaro
            </li>
            <li>
                <i class="fa-edit far"></i>PA Poem By hosted by Lisa Grove
            </li>
            <li>
                <i class="fa-moon far"></i>They Write by Night hosted by Suzanne Lummis
        </ul>         
    </ul><span class="pricing-table-divider"></span><a class="btn" href="#"><b>Sign Up</b></a><span class="pricing-table-divider"></span>
</div>

```

```auto
.pricing-box ul:first-child:before {
    font-family: font-awesome;
    font-weight: 900;
    content: "";
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

```

---

<div class="post-metadata">

### Author: ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)
#### Post date: [January 31, 2022, 8:14am UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/2 "2022-01-31T08:14:14Z")

</div>

Hi @kat,

`<i class="fa-arrow-alt-circle-right far">` needs to be `<i class="far fa-arrow-alt-circle-right">`

> **[Font Awesome](https://fontawesome.com/v5.15/icons/arrow-circle-right?style=regular)**
>
> The world’s most popular and easiest to use icon set just got an upgrade. More icons. More styles. More Options.

Don’t know if your using Bootstrap or else, but this is a general way of doing it. `:before` is used for other purposes in CSS.

You just place your icon before the text (like you did) of the navigation and make them show inline with the text.

> **[How To Create a Responsive Navigation Menu with Icons](https://www.w3schools.com/howto/howto_css_navbar_icon.asp)**
>
> W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [January 31, 2022, 2:43pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/3 "2022-01-31T14:43:10Z")

</div>

> [@AllMediaLab](#):
>
> `<i class="fa-arrow-alt-circle-right far">` needs to be `<i class="far fa-arrow-alt-circle-right">`

That works!

1. How do I recolor bottom 3 li FA icons?
2. Still like to know how I place an FA in ::before.

Not using Bootstrap, just html, css & js.

`<div class="pricing-box"><span class="price">Choose Your Option</span> <h2>Tax Deductions</h2> <ul> <li> <i class="far fa-arrow-alt-circle-right"></i> Once-a-year membership donation. </li> <li> <i class="far fa-arrow-alt-circle-right"></i> A particular Poetry.LA series or a single episode for screen credit: </li> <ul> <li> <i class="far fa-hand-point-right"></i> Poetry.LA Interview Series hosted by Mariano Zaro </li> <li> <i class="far fa-edit"></i> A Poem By hosted by Lisa Grove </li> <li> <i class="far fa-moon"></i> They Write by Night hosted by Suzanne Lummis </ul> </ul><a class="btn" href="#"><b>Sign Up</b></a> </div>`

 ![Screen Shot 2022-01-31 at 9.57.23 AM](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/9/9dd00cc2e93352fd24b5177d83b8152bab7bae0c.png)

---

<div class="post-metadata">

### Author: ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)
#### Post date: [February 1, 2022, 3:23pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/4 "2022-02-01T15:23:43Z")

</div>

@kat

You find the font code to put in your before by visiting [FontAwesome’s website](https://fontawesome.com/v5.15/icons/arrow-circle-right?style=solid). This icon’s unicode is at the top `f0a9` so your code will be the following…

```css
ul li::before {
  content: '\f0a9';
  font-family: font-awesome; /* <-- Assuming you know this for certain */
  color: red; /* <-- whatever color you want */
  ...
}

```

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 1, 2022, 3:39pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/5 "2022-02-01T15:39:00Z")

</div>

I had hoped that I could get the specific FA I wanted inside pinegrow, rather than going to the FA site, getting the icon and code, but guess not. So thanks for the clarification @fakesamgregory.

---

<div class="post-metadata">

### Author: ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)
#### Post date: [February 1, 2022, 8:23pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/6 "2022-02-01T20:23:37Z")

</div>

@kat by selecting the element, you should see it in the style inspector (see image). If you don’t see it then click on “Show X more rules from all.css”.

I just pointed you to the documentation as it’s always good practice to look at the documentation 🙂

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/c/c2c05ba4d0f7242e051279333a6258e2ca7436a2.png)

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 1, 2022, 8:51pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/7 "2022-02-01T20:51:54Z")

</div>

Seems I would first have to have the FA in a non :before to be able to get the name and content. Then I could use that to put it into a :before.

---

<div class="post-metadata">

### Author: ![nebula](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/nebula/32/3567_2.png) [@nebula](https://forum.pinegrow.com/u/nebula)
#### Post date: [February 5, 2022, 11:43pm UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/8 "2022-02-05T23:43:17Z")

</div>

FA isn’t HTML or CSS code; it’s just part of the name of the icon (FontAwesome names all of its icons like that). It has no formatting effect on its own. The icon will appear on your page only if you’ve previously declared where to get the icon. This is only needed once per page.

If you can see the icons, that means the page already has the right declaration or Javascript. To change the icon color, specify color as a style for the \< i \>:

```auto
<i class="far fa-arrow-alt-circle-right" style="color: blue"></i>

```

No need for :before. You can change everything about the icon including its size and position by editing the quoted bit of the CSS **class** and **style** attributes.

---

<div class="post-metadata">

### Author: ![kat](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/kat/32/2221_2.png) [@kat](https://forum.pinegrow.com/u/kat)
#### Post date: [February 6, 2022, 1:14am UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/9 "2022-02-06T01:14:42Z")

</div>

> [@nebula](#):
>
> No need for :before.

I had tried a :before for an FA, it did nothing exciting.

---

<div class="post-metadata">

### Author: ![fakesamgregory](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fakesamgregory/32/3903_2.png) [@fakesamgregory](https://forum.pinegrow.com/u/fakesamgregory)
#### Post date: [February 6, 2022, 8:26am UTC](https://forum.pinegrow.com/t/font-awesome-li-before/6200/10 "2022-02-06T08:26:12Z")

</div>

> [@kat](#):
>
> Seems I would first have to have the FA in a non :before to be able to get the name and content. Then I could use that to put it into a :before.

@kat exactly. That’s why we use documentation. I’m not quite sure what you’re expecting? Some browser or documentation from within Pinegrow?
