Closed SephVelut closed 10 years ago
Cannot debug without a reduced test case. This is clearly outlined in outlined in our Issue Submission Guidelines
I've reproduced the issue on codepen with the bare minimum.
http://codepen.io/SephVelut/pen/phrFu
Browsers tried with same result: Safari, Chrome, Firefox.
https://github.com/davatron5000/FitText.js#css-faq
In the CSS FAQ on the readme we note that inline elements (like span
) don't have width, so you can't calculate a ratio. You'll need to use display: block
or display: inline-block
to fix.
display: block
works but display: inline-block
does not without setting a width on the span element. But thats not a Fittext issue of course. Thanks for help btw.
You'll need a width (display block defaults to width: 100%
). For your specific situation, I'd probably pad the div on the left, and absolutely position your static unchanging text ("Call").
That's as far as I can help you on this. I think grok it out some more. You're probably pretty close.
Thanks, yeah I think I can take it from here.
I've made a video of a problem I keep havng with fittext. Not sure how to describe it other than text infinitely shrinks into a singularity when resizing and I have the preset set to default (1.2)
$('.call-header span').fitText();
video - > http://d.pr/v/tpQk