Closed bartveneman closed 12 years ago
Is it possible that font-size is shared across pages because they're all applied to the same element, but with different content? For example: if I would give all hgroup h1's a unique ID, would in work?
The font-size shouldn't be cached. It's executed after ever page load.
Maybe there's some confusion on how FitText works. It's ratio based resizing so the font size is determined by the parent element's width.
fitText(1.1)
would be 1/11th of the width of the container. so if your parent container (column of text) is 550px wide, the font size would be 50px.
Does that help?
That does the trick. I was indeed confused by the compressor worked. That's solved now, thank you very much.
I'm using fittext on all my hgroup h1's. On the homepage it works like a charm, however, the calculated font size seems to be used across all pages that use this pattern. The css is like this:
And the js:
As I said: it looks like the value is calculated only once and this value is cached and used in other pages. Am I doing something wrong, or is there a solution to this?