Title: CSS font problem (bug?)
Last modified: August 31, 2016

---

# CSS font problem (bug?)

 *  Resolved [salvanwezel](https://wordpress.org/support/users/salvanwezel/)
 * (@salvanwezel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/)
 * A few places that are not supposed to, like body text and the admin post page,
   use this piece of css form fontawesome.css according to the inspector:
 *     ```
       [class*="fa-"]{
         display: inline-block;
         font-family: FontAwesome;
         font-style: normal;
         font-weight: normal;
         line-height: 1;
         -webkit-font-smoothing: antialiased;
         -moz-osx-font-smoothing: grayscale;
       }
       ```
   
 * The admin posts page on top of that also has this from the edit.php:
 *     ```
       [class*="fa-"]{display: inline-block;font-family: FontAwesome!important;font-style: normal;font-weight: normal;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}
       ```
   
 * I’ve tried a lot of things(reinstalling theme, turning of plugins, etc.) but 
   I don’t know how to fix this. Please help me.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Theme Author [OptimizerWP](https://wordpress.org/support/users/layerthemes/)
 * (@layerthemes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079553)
 * [@salvanwezel](https://wordpress.org/support/users/salvanwezel/) This is a necessary
   css code of the theme. Can you please let us know what issues you are having?
   and what your site address is?
 * Thanks
 *  Thread Starter [salvanwezel](https://wordpress.org/support/users/salvanwezel/)
 * (@salvanwezel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079641)
 * The issue is I think the body text of posts is supposed to use Open Sans?
    Also
   the font of the text on the admin page for all posts is not supposed to be fontawesome.
 * This is the url: [http://gbiomed.kuleuven.be/apps/pentalfa/wordpress/](http://gbiomed.kuleuven.be/apps/pentalfa/wordpress/)
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079642)
 * It looks like it’s a FontAwesome problem. The code you posted in your original
   post means “any class that contains ‘fa-‘ at any point”. Your posts are in the
   category “Pentalfa Sessie”, and so WordPress outputs the class “category-pental**
   fa-**sassie”, which matches what FontAwesome is looking for.
 * The best way to fix it would be to ask FontAwesome to use `class[^="fa-"]` instead,
   which means “any class that begins with ‘fa-‘”. You could try forcibly overriding
   it, though:
 *     ```
       .category-pentalfa-sessie {
       	font-family: "Open Sans" !important;
       }
       ```
   
 *  Theme Author [OptimizerWP](https://wordpress.org/support/users/layerthemes/)
 * (@layerthemes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079648)
 * Thanks for your feedback Stephen, you are correct.
 * [@salvanwezel](https://wordpress.org/support/users/salvanwezel/) You can try 
   replacing it with:
 * `i[class*='fa-']`
 *  Thread Starter [salvanwezel](https://wordpress.org/support/users/salvanwezel/)
 * (@salvanwezel)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079651)
 * Thanks for finding the problem! So stupid of me. I solved it by changing the 
   name of the post category.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CSS font problem (bug?)’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/optimizer/0.7.4/screenshot.png)
 * Optimizer
 * [Support Threads](https://wordpress.org/support/theme/optimizer/)
 * [Active Topics](https://wordpress.org/support/theme/optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/optimizer/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [font](https://wordpress.org/support/topic-tag/font/)

 * 5 replies
 * 3 participants
 * Last reply from: [salvanwezel](https://wordpress.org/support/users/salvanwezel/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/css-font-problem-bug/#post-7079651)
 * Status: resolved