Solved

Custom fonts

Posted on 2012-03-30
2
340 Views
Last Modified: 2012-04-24
Hello,
I'm trying to use custom fonts with @font-face but cannot seem to get them to work. I can see them being downloaded on the web page but no luck. Here is what I have in .css:

@font-face
{
    font-family: ChalkDust;
   src: url(http://www.bbdsolutions.net/fonts/chalkdust.ttf);
}

@font-face
{
    font-family: Copperplate Gothic Light;
   src: url(http://www.bbdsolutions.net/fonts/COPRGTL.ttf)
}
@font-face
{
    font-family: Copperplate Gothic Bold;
   src: url(http://www.bbdsolutions.net/fonts/COPRGTB.ttf)
}
.pageHeader
{
    font-family: ChalkDust, Copperplate Gothic Light, Copperplate Gothic Bold;
    font-size: 1.8em;
    padding: 3px 0 10px 2px;
    color: #463E3F;
    font-weight: bold;
}

Here is my code-behind HTML:


<head runat="server">
    <link rel="stylesheet" type="text/css" href="Main.css" />

    <title></title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
    <style type="text/css">
        .style7
        {
            width: 594px;
            }
        .style8
        {
            height: 18px;
        }
        .style9
        {
            width: 594px;
            height: 60px;
        }
    </style>
    </head>



<table style="width: 100%; color: #00FF00; background-color: #000000; font-family: ChalkDust; height: 100px; border:0;"
            align="center">
            <tr>
     
                <td valign="top" align="center" class="style7"
                    style="border-style: none; border-width: 0px; background-image: url('http://www.bbdsolutions.net/Art/lead-214.jpg')" >
                   
                    <asp:Label ID="Label2" runat="server" Font-Names="Copperplate Gothic Light"
                        Font-Size="Small" ForeColor="#666666"
                        Text="Off the Grid Technology, LLC"></asp:Label>
               
                   
                    <br />
                    <asp:Label ID="Label3" runat="server" Font-Size="XX-Large" Text="Tree Squat'R"></asp:Label>
               
                   
                </td>
               
            </tr>
</table>

the .ttf files are there.
Any help would be great - thx
0
Comment
Question by:thenrich
  • 2
2 Comments
 
LVL 12

Accepted Solution

by:
jagssidurala earned 500 total points
ID: 37793298
instead of placing @fontface class in separate file kept in the HTML page header section ........
0
 
LVL 12

Expert Comment

by:jagssidurala
ID: 37793310
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create an MVC5, Razor Widget 2 29
asp enable view state 1 28
Example works but why do I need to click twice on button 4 49
"Emulate" TAB key when press Enter Key 3 49
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question