i am designing a site that adjusts itself to the window size, and i need to make the text size relative to it's container (a div). I searched about doing it with css, and found out that it is not possible. So i am trying with JavaScript, but i am not a JavaScript programmer. So i searched each piece of the code i needed and compiled it to this:\[code\]<script type="text/javascript"> $(document).ready(function() { while(true) { document.getElementById("text").style.fontSize = $("container").height(); } });</script>\[/code\](the "while" is to re-size it constantly, considering that the user might re-size the window)I put the script in the "head" tag, and it doesn't work. I don't know if the script is wrong, or if it is not running. What am i doing wrong?Also i want to put a delay in the end of the script, to avoid it running like crazy, but i don't know how to do that.Thanks in advance,LucaThanks to the answers, but nothing working.I guess that the script is not running, what can be wrong??? Please help!