开发者

How do I dynamically adjust size to fit text?

开发者 https://www.devze.com 2023-03-16 16:57 出处:网络
I am using Rails3 + jQuery to build an app using Facebox. In the facebox, the title text is too big to fit in a single line, so it is being spr开发者_StackOverflow社区ead into two lines. It looks ug

I am using Rails3 + jQuery to build an app using Facebox.

In the facebox, the title text is too big to fit in a single line, so it is being spr开发者_StackOverflow社区ead into two lines. It looks ugly, so I was wondering whether there was a way to either:

  1. Adjust the size of the title dynamically to fit the facebox width.
  2. Dynamically adjust the facebox width to fit the title text on a single line.


I think this answer fits your needs: Calculating text width

0

精彩评论

暂无评论...
验证码 换一张
取 消