Skip to Content

sIFR solution

At the beginning of this year, I briefly bitched about problems implementing Mike's sIFR - a client-side text-to-flash replacement technique - on this site. Today I found a solution to the scalable problem I've experienced using sIFR on some recent projects: by adding the display property with inline as the value to the <h1> (etc.) header selectors, they become as wide as they need to be, ie. the length of the heading text.

h1 { display: inline; }

Brilliant, I can't believe I'd overlooked that.

 

5 Comments

17 July 2005
03:05 am

jawrr

This may be useful in the future… I’ll just keep it in mind. Thanks!

18 July 2005
04:11 pm

Lee

I’ve only messed with sIFR a little bit, and this is exactly what kept me from seriously using it.

It’s amazing how such simple fixes can be overlooked so easily. Thanks!

19 July 2005
12:06 pm

coda

It does mean though that you lose lots of style control (no margins, padding, height, etc.) over the element because you’re changing it from block to inline, but if you’re careful then it’s a sacrifice worth making.

19 July 2005
03:46 pm

Dan Mall

Ha, I was just asking someone yesterday if this was possible. Thanks for the heads up!

13 July 2006
03:09 am

lebogang nkoane

ha, I found about this, yesterday, now i am obsessed with display, its fantastic,,,

Leave a Comment

Your e-mail address is required, but will not be published.

 
 
 

Tags allowed:  <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>