Community Forums › Forums › Archived Forums › Design Tips and Tricks › centering font awesome font icons
- This topic has 3 replies, 2 voices, and was last updated 12 years, 3 months ago by
David Chu.
-
AuthorPosts
-
November 13, 2013 at 12:19 am #72652
dmcleod87
Memberhi all,
i'm using the font awesome plugin for some social media icons but having a little trouble with the alignment. if you visit this page http://dev.dylanmcleod.net.au/us-explained/
you will notice that the font icons aren't in the center of the circle. i've been using trial and error with editing the css but just can't figure it out. the html is below and links to the css are below that. hopefully someone can point me in the right direction!<div class="social-links-container"> <ul class="aligncenter"> <li><a class="social-links" href="mailto:[email protected]" target="_blank">[icon name=icon-envelope]</a></li> <li><a class="social-links" href="http://www.catwalkofwords.com" target="_blank">[icon name=icon-laptop]</a></li> <li><a class="social-links" href="http://www.facebook.com/catwalkofwords" target="_blank">[icon name=icon-facebook</a></li> <li><a class="social-links" href="https://twitter.com/CatwalkofWords" target="_blank">[icon name=icon-twitter]</a></li> <li><a class="social-links" href="http://instagram.com/catwalkofwords#" target="_blank">[icon name=icon-instagram]</a></li> </ul> </div>CSS - http://d.pr/f/gDqz
http://dev.dylanmcleod.net.au/us-explained/
Font-Awesome CSS - http://d.pr/f/nSxRNovember 13, 2013 at 9:27 am #72706David Chu
ParticipantHi,
That's a very tricky CSS problem, just the stuff I enjoy. That's really tough to dial in. As you've seen, zillions of competing bits of code. The quickest result that looked decent that I found was to use the padding setting below instead of 10px:.page-id-2 .entry-content .social-links-container a.social-links {
background-color: #000000 !important;
border-bottom: 0 solid #FFFFFF !important;
border-radius: 40px !important;
color: #FFFFFF !important;
font-size: 30px !important;
padding: 14px 9px 10px 16px;
text-align: center !important;
}Not a perfect circle, but decent triage. There are several other bits of CSS code for those links, so the padding command may work elsewhere, too. Otherwise, hours more fiddling. Changing the font size of the link would allow more exactitude, but would require many more code changes, I think.
Good luck,
Dave
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
November 13, 2013 at 4:34 pm #72795dmcleod87
Memberthanks dave! way better than i had. will keep experimenting and see if i can improve.
November 13, 2013 at 5:09 pm #72808David Chu
ParticipantSounds good! I might mess around with that FontAwesome stuff myself - I enjoy typography, and it looks fun. I never warmed to Cufon and other early ones - too much hassle and breakage of other site parts.
Dave Chu · Custom WordPress Developer – likes collaborating with Designers
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.