Announcement

Collapse
No announcement yet.

Help with CSS and custom fonts in html

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with CSS and custom fonts in html

    Trying to use a custom font on a simple web page and it works except when I invoke the @font-face command it actually prints that on the page. Any CSS experts explain to me what I'm doing wrong here?

    It's a page that displays a speedometer. Here's a link and the code follows:

    Code:
    @font-face {
            font-family: "TexasLED";
            src: url(/var/www/fonts/TEXASLED.TTF);
            format("truetype");
            }
    
    <div style="background-image:url(/images/speedo.gif);
                    background-repeat:no-repeat;
                    width:400px;
                    height:380px;">
    
    <div style="position: absolute; top:160px; left: 120; width:200px;
            height:25px; font-family: TexasLED; font-size: 300%; color: #1589FF">
    
    120 mph
    
    </div>
    Originally posted by ghettocruzer
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  • #2
    Your page is timing out.
    2001 Mustang Convertible Worklog
    Indigo Custom Frontend (Flash/Delphi)
    Blog

    Qube v1.3 Now Available at the mp3Car Store!!!!!!
    The simplest IO controller you'll ever use!

    Comment


    • #3
      it should be this
      <style>
      font-face {
      font-family: "TexasLED";
      src: url(/var/www/fonts/TEXASLED.TTF);
      format("truetype");
      }
      </style>

      i think this is right ant done it for a while though

      Comment


      • #4
        Thanks, that was the trick! Funny that none of the tutorials mention the style tag. I guess I ought to learn a little more about CSS.

        @colin - oops, I linked to my internal ip. Here's the working link.
        Originally posted by ghettocruzer
        I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
        Want to:
        -Find out about the new iBug iPad install?
        -Find out about carPC's in just 5 minutes? View the Car PC 101 video

        Comment


        • #5
          Originally posted by Bugbyte View Post
          Thanks, that was the trick! Funny that none of the tutorials mention the style tag. I guess I ought to learn a little more about CSS.

          @colin - oops, I linked to my internal ip. Here's the working link.
          Yeah. Unless you developed an external stylesheet (.css file), which you do not include the <style> tag, you need to specify it in the normal html document so the computer knows what to do with it and how to display it.
          "Live Free!!!...It's all about Open Source"
          Recent Proj
          Old Proj II
          Old Proj I
          YouTube:Project Videos
          Homepage: HexxWorld.net
          Twitter:http://twitter.com/hexxamillion

          Comment

          Working...
          X