Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

@font-face CSS help!

Status
Not open for further replies.

swhitty

Technical User
Oct 18, 2011
1
0
0
CA
I have a toolbar on my cosmetics site "and I want to use the font SegoeUI using @font-face. I've tried several methods to no avail.

Any help would be greatly appreciated!!

Scott
webmaster
 
Hi
[ul]
[li]Make sure the font files are available :
FireBug Console said:
[tt][COLOR=white red] X [/color] [red]"NetworkError: 404 Not Found - [ignore][/ignore]"[/red]
[COLOR=white red] X [/color] [red]"NetworkError: 404 Not Found - [ignore][/ignore]"[/red][/tt]
[/li]
[li]Use it. The font's given name is SegoeUILight, calling it other ways will not work :
incorrect said:
[tt]font-family: "segoe UI";
font-family: Segoe UI;[/tt]
Code:
font-family: SegoeUILight;
[/li]
[li]Beside that, setting the [tt]font-family[/tt] for .clearFix:after will have no visual effect. Use the .clearfix class only for its intended purpose : to clear the floats.[/li]
[/ul]

Feherke.
 
Hi

Ah, found your other post in thread253-1655611. There you wrote
swhitty said:
I have uploaded the font to a folder in the siteroot called "fonts" and the font is named SEGOEUIL.TTF
Then why not specified that in your CSS ?
Code:
@font[teal]-[/teal]face [teal]{[/teal]
    [COLOR=coral]font-family:[/color] '[COLOR=darkgoldenrod]SegoeUILight[/color]';
    [COLOR=coral]src:[/color] [COLOR=darkgoldenrod]url[/color]('[COLOR=darkgoldenrod]segoeuil-webfont.eot[/color]');
    [COLOR=coral]src:[/color] [COLOR=darkgoldenrod]url[/color]('[COLOR=darkgoldenrod]segoeuil-webfont.eot[/color]?[green][i]#iefix[/i][/green]') [COLOR=darkgoldenrod]format[/color]('[COLOR=darkgoldenrod]embedded-opentype[/color]'),
         [COLOR=darkgoldenrod]url[/color]('[COLOR=darkgoldenrod]segoeuil-webfont.woff[/color]') [COLOR=darkgoldenrod]format[/color]('[COLOR=darkgoldenrod]woff[/color]'),
         [COLOR=darkgoldenrod]url[/color]('[highlight][COLOR=darkgoldenrod]fonts[/color]/[COLOR=darkgoldenrod]SEGOEUIL.TTF[/color][/highlight]') [COLOR=darkgoldenrod]format[/color]('[COLOR=darkgoldenrod]truetype[/color]'),
         [COLOR=darkgoldenrod]url[/color]('[COLOR=darkgoldenrod]segoeuil-webfont.svg[/color]#') [COLOR=darkgoldenrod]format[/color]('[COLOR=darkgoldenrod]svg[/color]');
    [COLOR=coral]font-weight:[/color] [COLOR=darkgoldenrod]normal[/color];
    [COLOR=coral]font-style:[/color] [COLOR=darkgoldenrod]normal[/color];
[teal]}[/teal]
And similarly for the other font files, if you have them. If not, then you could remove them from the rule.

( By the way, your question has absolutely nothing to do with web design. This question should be asked in forum215. )


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top