I´m making a simple website to display information from XML file that is created from information read from a server. Problem is that if user inserts information onto the server which is too long then the site alters. I was wondering if I could use JQuery and CSS to make the text in a certain cells smaller if it exceeds certain number of characters?
I would not make the text smaller. Depending on the amount, you could make it so small that no one could read it.
Why not wrap the content in a div
, set that div
's height
and width
to match whatever you want the table
cell to be. Then set the div
to overflow-y:scroll;
.
That way the text size won't change and the content will be usable no matter what the size.
An example: http://jsfiddle.net/jasongennaro/zpZXD/