SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change SiFR font color

    How do I change the font color in SiFR? I used version 3 and followed the tutorial to set it up here.

  2. #2
    SitePoint Evangelist ferrari_chris's Avatar
    Join Date
    Mar 2008
    Location
    NP, New Zealand
    Posts
    576
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which text colour do you want to change?

    The Flash text or the HTML alternative?

  3. #3
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ferrari_chris View Post
    Which text colour do you want to change?

    The Flash text or the HTML alternative?
    the flash text

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    The documentation for SiFR says:

    To replace the fonts you call sIFR.replaceElement. This method takes the following arguments, in this specific order:

    • sSelector: This is the CSS selector you use to select the elements you want to replace. The supported CSS selectors are #, > and .. Whitespace is used to select descendants. Please use whitespace only for this, so instead of #foo > p use #foo>p. You can use multiple selectors by seperating them with a comma (",").
    • sFlashSrc: location of the Flash movie. You might need to use a relative (./movie.swf) or absolute (/movie.swf) here.
    • sColor: Text color. All colors are in hex notation (#000000).
    • sLinkColor: Text color for links.
    • sHoverColor: Color for hovered links.
    • sBgColor: Background color.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the documentation for sIFR2. For v3, you want this instead.

  6. #6
    SitePoint Addict
    Join Date
    Dec 2007
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Tyssen View Post
    That's the documentation for sIFR2. For v3, you want this instead.
    I've seent his page before but after reading through it didnt find anything about changing the color..there is another page on styling at the bottom which might have what I need so I'll try that out and see how that works! thx

  7. #7
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,729
    Mentioned
    104 Post(s)
    Tagged
    4 Thread(s)
    Here is SiFR3 sample code that includes color settings from http://infodotnet.blogspot.com/2008/...your-blog.html

    Code javascript:
    var myFont = {
    src: 'http://your.hosting.com/where/is/your/font.swf'
    };
     
    sIFR.activate(myFont);
    sIFR.replace(myFont, {
        selector: '.post-title'
        ,wmode: 'transparent'
        ,css: [
            'a { color: #465dd2; text-decoration: none; }'
            ,'a:link { color: #465dd2; }'
            ,'a:hover { text-decoration: underline; }'
        ]
    });
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •