Skip to main content
Inspiring
June 17, 2019
Question

make font color exceptions in footer

  • June 17, 2019
  • 2 replies
  • 624 views

Hi,

If the bulk of the fonts in footer are a specific color, but I'd like to make some in yet another color... how can I achieve this?

I have unique ID for the fonts I want in alternative color, but they are not applying. Not sure what else. They're font awesome icons.

#socialIconID {

    color: #57b6e5;

    font-size: 38px;

    margin-left: -90px;

}

#socialIconID a {

    color: #57b6e5;

    }

#socialIconID a:hover {

    color: #3254bc;

    }

#socialIconID a:active {

    color: #5e32bc;

    }   

#socialIconID a:focus {

    color: #5e32bc;

    text-shadow: 1px 1px 1px #ccc;

    }     

.faStyle {

   

    display: inline-block;

    font-family: FontAwesome;

    font-size: 32px;

    font-style: normal;

    font-weight: normal;

    line-height: 1;

    -webkit-font-smoothing: antialiased;

}

.fab {font-family: "Font Awesome 5 Brands";}

HTML

<div class="social">

   <div id=socialIconID">

          <a href="">
<i class="fab faStyle fa-linkedin" aria-hidden="true"></i>

Do I need to apply socialIconID to the 'i' tag or the 'a' tag?

This topic has been closed for replies.

2 replies

John Waller
Community Expert
Community Expert
June 17, 2019

I have unique ID for the fonts I want in alternative color, but they are not applying.

What is not applying exactly? Can you show us the full page code?

Even better, a link to the page showing the issue you're trying to solve.

Nancy OShea
Community Expert
Community Expert
June 17, 2019

Linked text gets its colors from the link pseudo-classes

a { }

a:link { }

a:visited { }

a:hover, a:active, a:focus { }

If you want to be more specific than that, use an anchor class.

footer a.red{ color:red}

footer a.magenta {color:magenta}

<footer>

<a class="red" href="#">Red link</a>

<a class="magenta" href="#">Magenta link</a>

</footer>

Nancy O'Shea— Product User & Community Expert
r_tistAuthor
Inspiring
June 18, 2019

OK, when I added ':link' next to the @socialIconID a { ....the correct color applied.

Why is my hover state color not applying?

#socialIconID a:hover {

    color: #3254bc;

    }

Nancy OShea
Community Expert
Community Expert
June 18, 2019

You're asking more questions and not providng much information.  What does "not working" mean?  As John said, for quickest answers post the URL to your problem page online so we're all on the same page.  Otherwise, it's just guesses.

Nancy O'Shea— Product User & Community Expert