tags:

views:

298

answers:

1

I have an H1 selector that I'm replacing with sIFR. Within some of the H1 selectors are < strong>< /strong> selectors; e.g.:

<h1>Hello world, <strong>this is some bold text</strong> and this is normal text</h1>

Everything outside of the < strong>< /strong> tags is replaced fine -- and the text within the tags does not display. I'd like to apply different styling to the < strong> text. Is this possible?

Here is my relevant sIFR code from sifr-config.js:

sIFR.replace(avenir_black, {
  selector: 'h1',
  css: '.sIFR-root { color: #000000; text-transform:uppercase; }',
  wmode: 'transparent'
});

I tried adding this, but no luck:

sIFR.replace(avenir_black, {
  selector: 'h1 strong',
  css: '.sIFR-root { color: #cc0000; text-transform:uppercase; }',
  wmode: 'transparent'
});
A: 

sIFR makes text inside <strong> tags bold. For the text to show up, the bold glyphs of the font need to have been exported. When creating the sIFR Flash movie, make sure to select a character and make it bold.

Mark Wubben
Mark,Duh. That makes sense. The only problem is that the font I'm using (Avenir Black) doesn't have any bold glyphs. I'm assuming it's possible to select another wrapper with CSS, but I didn't have any luck.For instance, I tried this:<h1>This is some text <span>and this is bold</span></h1>Then, in my sifr-config.js:sIFR.replace(avenir_black, { selector: 'h1 span span', css: '.sIFR-root { color:red; }', wmode: 'transparent'});But that didn't work.
Ryan
No, the `<span>` is already replaced as part of the `<h1>`. You can add `strong { font-weight: normal; }` to the CSS though to switch back to normal glyphs.
Mark Wubben