Results 1 to 5 of 5

Thread: Help with CSS and custom fonts in html

  1. #1
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,359
    Blog Entries
    2

    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>
    Quote Originally Posted by ghettocruzer View Post
    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. #2
    Vendor - Qube colin's Avatar
    Join Date
    Dec 2006
    Posts
    796
    Your page is timing out.

  3. #3
    Low Bitrate
    Join Date
    Jan 2008
    Posts
    87
    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

  4. #4
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,359
    Blog Entries
    2
    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.
    Quote Originally Posted by ghettocruzer View Post
    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

  5. #5
    FLAC hexxamillion's Avatar
    Join Date
    Dec 2007
    Location
    AZ
    Posts
    1,108
    Quote 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"
    Current Proj:Android Mount in 2013 Altima
    Old Proj II
    Old Proj I
    YouTube:Project Videos
    Homepage: HexxWorld.net
    Twitter:http://twitter.com/hexxamillion

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •