Can any one suggest the CSS/Script for thsi problem |
Can any one suggest the CSS/Script for thsi problem |
venkat_walking |
Aug 10 2009, 03:27 PM
Post
#1
|
Member Group: Members Posts: 30 Joined: 22-May 09 Member No.: 8,678 |
Hello Friends,
Say, I am having a <DIV > of Width=100 and Height 100. Now I want to insert some text (words ranging from 4 char - 8 char) in to that <DIV> as innerHTML , words would be separated by a SPACE. Total characters in a DIV innerHTML would range from 0-80; The point and need is that, The word i.e the contents should get * wrapped , automatically * Resized autimatically to fit in the div. No matter how small it goes. (But It would have a max size limit). I know java script will come in the play. Any suggestion would be very helpful Thanks, Venkat |
Christian J |
Aug 12 2009, 08:46 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,653 Joined: 10-August 06 Member No.: 7 |
Maybe you could check if the DIV's scrollHeight is larger than its clientHeight (that should happen when a scrollbar is created in a DIV styled with 'overflow: auto'), which means the text must be made smaller, but it sounds complicated and bug-prone.
|
venkat_walking |
Aug 13 2009, 05:10 AM
Post
#3
|
Member Group: Members Posts: 30 Joined: 22-May 09 Member No.: 8,678 |
Maybe you could check if the DIV's scrollHeight is larger than its clientHeight (that should happen when a scrollbar is created in a DIV styled with 'overflow: auto'), which means the text must be made smaller, but it sounds complicated and bug-prone. Ok i will check it out and get it to you Thanks Venkat |
Lo-Fi Version | Time is now: 18th April 2024 - 11:08 PM |