Phone and FAX

Tel: 0845 121 1194
Fax: 0845 121 1195

Archives:

  • August 2008
  • July 2008
  • May 2008
  • April 2008
  • March 2008
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • July 2006
  • June 2006
  • Meta:

    » Login
    » RSS

    Categories:

  • CSS
  • Web Design
  • Css Font-Face - Src: url  -  May 2, 2008

    That’s right it is now an option in CSS that you don’t have to rely on your standard fonts that come pre installed. For a long time this has been a big drawback for web designers. If you wanted to use a fancy font or break from the norm and not use a standard font then you have always had to place your text in an image.

    Well from now on you won’t! As long as all your end users use Safari! So this doesn’t make a massive story because you are still limited but its progress, and it’s in the right direction.

    You can now use any font you like by specifying the source of the font in your Css file. If you use a non standard font then you can upload the font file to your server and in your CSS file specify its path just like you would with an image.

    First you need to define the font:

    1
    2
    3
    4
    5
    6
    7
    
    @font-face {
     
    font-family: spacial font;
     
    src: url(’special.otf);
     
    }

    You need to repeat this for any bold or other versions of the font you will use. Then you can use the font in your normal css statement:

    1
    2
    3
    4
    5
    
    p {
     
    font-family: Special,sans-serif; font-weight: normal;
     
    }

    Gary
    Web Designer

    Gary at 2:18 pm

    No Comments

    No comments yet.

    Leave a comment