Closed hj8ag closed 9 years ago
Inline elements don't have height/width so FitText can't work properly. If you display: block
them that should work. There are some tips in the readme if you need help there.
Also, you have a $(document).ready()
inside a $(document).ready()
, that might be unnecessary.
Best of luck. Keep plugging away at it.
Hi guys,
I also posted this over on Stack Overflow but so far no responses, so I thought it might be best to just ask here and see if there was an obvious solution I'm missing!
Running into a few problems using FitText.js - I'm triggering the script in my
with the following code (I've included everything for reference, and the plan is to minimise this when I'm finished with the design and code layout)The main point of interest there is probably the following:
From here I'm applying it to two elements, and which are defined in my CSS as follows:
and then referenced in my HTML like so:
Now, my understanding is that they should scale with their parent element - however something is up and I can't work out what it is! You can take a look at what is happening here (most noticeable on resize) - http://jameshenry.info/test/test.php
I've tried a couple of different things but can't seem to get all of the text on the rollovers to be consistent, let alone scale up or down in proportion!
I was originally targeting the .fittext1 and .fittext2 elements using #ID but switched to class due to multiple instances, however switching between the two doesn't solve the issue.
Does anyone have any idea what could be causing this behaviour?