开发者

CSS Ignoring font face

I am putting together a website in codeIgniter, but I'm having some trouble with the CSS

The below code is giving me a serif font - I know the stylesheet's properly linked because the text f开发者_运维问答its all the other parameters, and changes when I unlink it.

span.navbig {
    font-size: 36pt;
    font-family: Gill Sans / Gill Sans MT, sans-serif;
    letter-spacing: -1.5pt;
    text-decoration: none;   
}

What am I not seeing here?

Thanks


Separate thefont types in your font-family declaration different, something like this:

font-family: "Gill Sans", "Gill Sans MT", sans-serif;

Here's some easy reference:

Note: Separate each value with a comma.

Note: If a font name contains white-space, it must be quoted. Single quotes must be used when using the "style" attribute in HTML.

And here's the W3C recommendation:

Font family names must either be given quoted as strings, or unquoted as a sequence of one or more identifiers. This means most punctuation characters and digits at the start of each token must be escaped in unquoted font family names.


When using FONT types that consist of two words, quotes must be placed on them so the browser does not read them as separate entries.

<style type="text/css">
    span.navbig {
      font-size: 36pt;
      font-family: "gill sans", sans-serif;
      letter-spacing: -1.5pt;
      text-decoration: none;   
    }
</style>

from http://www.htmlite.com/CSS004.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜