Phillip Mclauren
Phillip Mclauren

Reputation: 417

WordPress font cross browser issue

I'm build a WordPress site.And I choose the font for the menu bar. But problem, this font show only Google chrome & it does not show in IE and Mozilla (FireFox).

Please help me

This is my font

#nav ul li a:hover, 
#nav .current-menu-item > a, 
#nav .current-menu-ancestor > a,
div#nav ul .current_page_item > a {
   color: #9A6614;
}

#nav > ul li, 
#nav .menu > ul li {
  padding: 8px 0;
}

#nav > ul li a,
#nav .menu > ul li a {
  padding: 0 25px 0 25px;
  font-size:17px;
  border-left: 1px solid #CFCFCF;
  font-family:"LovePotionNo10Bold" !important;
}

#nav ul li:first-child a{
  font-family:LovePotionNo10Bold !important;
  border-left: 0px;
}

and below is my header file declaration

@font-face {
font-family: 'LovePotionNo10';src: url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_0_0.eot');
src: url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_0_0.eot?   #iefix') format('embedded-opentype'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_0_0.woff') format('woff'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_0_0.ttf') format('truetype');
}

@font-face {
font-family: 'LovePotionNo10Bold';
src: url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_1_0.eot');
src: url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_1_0.eot?#iefix') format('embedded-opentype'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_1_0.woff') format('woff'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_1_0.ttf') format('truetype');
}

@font-face {
font-family: 'LovePotionNoOrnaments';
src: url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_2_0.eot');
src: url('webfonts/22418E_2_0.eot?#iefix') format('embedded-opentype'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_2_0.woff') format('woff'),
url('http://comidaslacocotte.com/wp-content/themes/maya/webfonts/22418E_2_0.ttf') format('truetype');
}

Upvotes: 0

Views: 437

Answers (2)

Alan Shortis
Alan Shortis

Reputation: 1109

Read this article: http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

Absolutely essential reading for anyone using @font-face. The suggested syntax is:

@font-face {
  font-family: 'Graublau Web';
  src: url('GraublauWeb.eot?') format('eot'), 
       url('GraublauWeb.woff') format('woff'), 
       url('GraublauWeb.ttf') format('truetype');
}

Upvotes: 1

Mark
Mark

Reputation: 6864

i see one typo in your code, dont know if it will solve your problem:

#nav ul li:first-child a{
  font-family: 'LovePotionNo10Bold' !important;
  border-left: 0px;
}

There needs to be quotes around the font declaration, singles or doubles.

FYI: i would suggest to drop the !important rule.

Upvotes: 1

Related Questions