Wiki.Novemberborn, sIFR 3 Documentation & FAQ

DetectingCSSLoad

sIFR can try to detect if the relevant CSS for the document has loaded. Using this check will speed up replacements in Safari and Opera – without it, the elements will be replaced on page load.

You can switch on the CSS load detection by setting sIFR.useStyleCheck = true; before calling sIFR.activate(). Please note that this is a bit of a hack, sIFR will temporarily insert a dummy element into the page, and test for a specific style attribute. For the CSS detection to work, you must place the following CSS code in the main stylesheet which also contains the .sIFR-active code:

.sIFR-dummy { 
  width: 0px;
  height: 0px;
  margin-left: 42px !important;
  z-index: 0;
}

You'll have to make sure that the dummy element, which is a div, does not have a different margin-left due to other styles.

Without the above CSS, the elements will be replaced on page load in all browsers.


Updated on December 25, 2008 19:03 by Anonymous Coward (78.172.255.98)

| See revision | Back in time (6 older revisions)


Navigation

sIFR 3 Documentation & FAQ

sIFR lets you use your favorite font on your websites by cleverly working with Flash, JavaScript and CSS. Here you'll find it's documentation and the FAQ. Leave a link to your implementation in the Examples!

Please donate

If you like sIFR, please consider making a donation so Mark can spend more time on it. Thank you.

Inside this wiki

Other destinations

Licensing

This wiki is licensed under the GNU Free Documentation License.

Miscellaneous

TextDrive

RubyOnRails