derek allard wrote:
Hello. We are working within a CMS and we have a dynamic text header that pulls into the top of the page. The problem is that there are certain titles that are too long and are breaking into other design elements. I'm thinking there should be a way to count the number of characters and then dynamically change the font-size of the header. 1. Is this possible? 2. Can you point me in the right direction? Thanks. derek
Unless you're using a monospace font the approach of counting characters will fail due to the differences in width between characters. I think a better way is to find out the width of a certain element using $('#title').width(), and then just make the font size smaller until it fits (with a loop or something).
Jonathan -- Jonathan Vanherpe - Tallieu & Tallieu NV - jonat...@tnt.be