JavaScript / jQuery: is it possible to change font-size to fill a set width?

Posted by Marius on Stack Overflow See other posts from Stack Overflow or by Marius
Published on 2010-03-26T13:20:00Z Indexed on 2010/03/26 13:23 UTC
Read the original article Hit count: 332

Hello there :)

I am writing an application, and in it, I would like to have some h1 elements with variable font size.

I use the full width (1000px) of a div as a limiter, and a script that automatically sets the font of the h1-element so that it fits the width of the div without line break.

This is quite easy to do with php GD, but I thought I wanted to do this client side.

Thank you for your time.

Kind regards
Marius

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about variable