1

I have Two sub-domains in my Wamp-server

in My Asset.localhost . I have css folder and , in this folder I have style.css file that contains @fontFace like Below Code :

@font-face {
    font-family: 'yekan';
    src: url('../fonts/Yekan-modified.eot');
    src: url('../fonts/Yekan-modified.eot#iefix') format('embedded-opentype'),
         url('../fonts/Yekan-modified.woff') format('woff'),
         url('../fonts/Yekan-modified.ttf') format('truetype'),
         url('../fonts/Yekan-modified.svg#CartoGothicStdBook') format('svg');
    font-weight: normal;
    font-style: normal;
}

Now I'd like to use this file (style.css) to http://management.localhost/dashbord/index.php

Css codes works as well But Fonts Doesn't work ! Where is My Mistake ?

Thank You...

VeeeneX
  • 1,556
  • 18
  • 26

1 Answers1

1

just specify full fonts path in your css file

@font-face {
    font-family: 'yekan';
    src: url('http://asset.localhost/admin/fonts/Yekan-modified.eot');
    src: url('http://asset.localhost/admin/fonts/Yekan-modified.eot#iefix') format('embedded-opentype'),
     url('http://asset.localhost/admin/fontsYekan-modified.woff') format('woff'),
     url('http://asset.localhost/admin/fontsYekan-modified.ttf') format('truetype'),
     url('http://asset.localhost/admin/fontsYekan-modified.svg#CartoGothicStdBook') format('svg');
    font-weight: normal;
    font-style: normal;
}

since .. specifies its parent directory but your fonts is in other directory so specifying full path will solve it

MJN
  • 610
  • 1
  • 7
  • 19