The problem is. The big box is the parent div in which there is a smaller div (smaller box) that contains an image. The rest of the bigger div should be filled with text (red/pink lines). Text is formatted in paragraphs (<p> .... </p> <p> .... </p>) and there are some links within text.
Sizes of divs are dynamic, they change when window size changes. So I want the font size to change to fit the main div. Is there any solution? I would really appreciate it.
10-10-2012, 05:00 PM
It sounds like you're looking for "responsive font size." If so, here's a great plugin: http://fittextjs.com/
10-10-2012, 05:16 PM
Thank you for your response. Still I have one question - how can I use mentioned script in html... let's say I have html code somewhat like this:
<p> text </p>
<p> text </p>
10-11-2012, 09:37 AM
Something like this?
10-11-2012, 11:41 AM
Shouldn't i write <script> something something </script> somewhere with the path of the script.
And where should I place this line you wrote?
Sorry for those questions, I haven't done anything like this before. Yet, I would like to make a website by myself. So all the help is appreciated. Thanks!
10-11-2012, 04:21 PM
Can you post your current code? I'll tell you where to place it then.
10-12-2012, 03:47 AM
Hey! Thanks for your response :) Here's my html code:
Thanks for your response, but I have to admit it, it does not work the way I would like. This fits the last row of each paragraph, but I would like to fit whole text into the div "taust". Because if I change my browser's window size, the size of the div "taust" changes, but the text size does not change, and breaks out of the div, but I would like the text to fit the div, yet I would not like to stretch my div. So I would like to manipulate the font size in order to fit it in the div. I think it is not possible just using html and/or css, that's why I would like to know, how to use the script you mentioned.
I'm still looking at this. That script seems to handle fitting text horizontally. It sounds like you need something that will fit the text both horizontally and vertically.
10-16-2012, 05:48 AM
Still, thanks for your time and effort! Seems like no-one is able to help me :(