3

I am using CSS for my headers where all menus should be coming as "Avenir Next" font-family. But it is not recognizing it. It is showing as simple Arial.

My code is :

#main .Header .mainnav ul {
  float: left;
  list-style: none;
  margin: -17px 0 0;
  padding: 0;
  font-family: Avenir Next !important;
  font-size: 14px; 
} 
Fabrizio Calderan loves trees
  • 109,094
  • 24
  • 154
  • 160
Aakash Kumar
  • 734
  • 2
  • 9
  • 28

1 Answers1

19

Try:

#main .Header .mainnav ul {
    float: left;
    list-style: none;
    margin: -17px 0 0;
    padding: 0;
    font-family: "Avenir Next" !important;
    font-size: 14px; 
}

It is because of " " Space in font name.

By Looking at your last comment, I'll suggest you to host a font-file in either a .ttf, .ote or .otf format and link that file in your page.

and use this code:

@font-face {
  font-family: 'Avenir Next';
  src: url("http://www.yoursite.com/fonts/Avenir_Next.otf"); /* File to be stored at your site */
  }

That will help you even if your font is not installed at your clients computer.

Hope it'll help you. cheers :)!

Vedant Terkar
  • 4,043
  • 5
  • 31
  • 57