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?
Share
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 thatdiv‘sheightandwidthto match whatever you want thetablecell to be. Then set thedivtooverflow-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/