Connecting Tech Pros Worldwide Forums | Help | Site Map

Query : Counting charcters in div tag with font size

Newbie
 
Join Date: Nov 2006
Posts: 1
#1: Nov 20 '06
Hi,
I am facing one problem. I'm describing with one example.

I have a div tag. In div tag i am setting some text value with any font-size.
But i am not able to count the chracters which is getting fit in defined div tag.

Div tag is having some width and height.
Expert
 
Join Date: Oct 2006
Location: NC
Posts: 1,722
#2: Nov 20 '06

re: Query : Counting charcters in div tag with font size


Not too clear can you post the code so we can tell what your talking about?
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#3: Nov 20 '06

re: Query : Counting charcters in div tag with font size


If you know the maximum numbers of chars you want to display in the div and the font-size you use, you could calculate and change the div via the DOM.

Ronald :cool:
Reply