Apply Calibri (Body) font to text
Asked Answered
U

3

31

I have a div and in this div I want to display some text in Calibri (Body) font.

How can I do this?

This is the css I have been given :

.an_account_join_1 {
    float:left;
    width:100%;
    color:#000000;
    font-family:Calibri (Body);
    letter-spacing:2px;
    font-size:14px;
    text-align:center;
    margin:20px 0px;
    }   

This is the div:

<div class="an_account_join_1">Individual Free Membership</div>

There is no font style displayed with this font family.

When I look at the firebug output there is no style for font family.

Upsilon answered 30/5, 2012 at 4:53 Comment(0)
L
-10

If there is a space between the letters of the font, you need to use quote.

font-family:"Calibri (Body)";
Lymphosarcoma answered 30/5, 2012 at 4:57 Comment(0)
I
104

There is no such font as “Calibri (Body)”. You probably saw this string in Microsoft Word font selection menu, but it’s not a font name (see e.g. the explanation Font: +body (in W07)).

So use just font-family: Calibri or, better, font-family: Calibri, sans-serif. (There is no adequate backup font for Calibri, but the odds are that when Calibri is not available, the browser’s default sans-serif font suits your design better than the browser’s default font, which is most often a serif font.)

Idealist answered 30/5, 2012 at 5:18 Comment(0)
L
6

change the font type for div use

.an_account_join_1{
font-family:"Calibri", sans-serif;
}

for the main menu in WordPress

#primary-menu{
    font-family:"Calibri", sans-serif;
    }
Lyndalynde answered 19/3, 2021 at 9:36 Comment(0)
L
-10

If there is a space between the letters of the font, you need to use quote.

font-family:"Calibri (Body)";
Lymphosarcoma answered 30/5, 2012 at 4:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.