Grow your CSS skills. Land your dream job.

sIFR: Loading multiple fonts into the same site.

  • # October 17, 2008 at 8:18 am

    Hi,

    I’ve bumped into a problem when trying to get 2 non-standard fonts to work on the same site useing sIFR.
    So, the problem is, I’ve added this to my javascript file:

    Code:
    var didot = {
    src: ‘js/didot.swf‘
    };

    sIFR.activate(didot);

    sIFR.replace(didot, {
    selector: ‘h2.cpost-title’,
    wmode: ‘transparent’
    });

    var standard_07_57 = {
    src: ‘js/standard_07_57.swf‘
    };

    sIFR.activate(standard_07_57);

    sIFR.replace(standard_07_57, {
    selector: ‘h1.cpost-title’,
    wmode: ‘transparent’
    });

    Were "didot" is my first font and "standard_07_52" is my second. Now I should be able to call "didot" into every <H2> in my HTML file and "standard_07_52" to every <H1> like this:

    Code:

    Didot font goes here

    Standard font goes here

    But, I always end up just getting the "didot" font on both. I’ve made 2 swf files aswell and all that … and tried to take away the transperency… Any one got a suggestion?

    /Zhelle

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".