Can anyone recommend how best to how to dynamically constrain amount of Text/Content in a DIV area that can vary in size??
That is, say you have:
(a) a content (DIV) area on your view that can expand/contract depending upon browser size (
i.e. when someone is re-sizing the browser window) and
(b) dynamic text/content that is to be displayed, based upon user input - e.g. image a defined area/size for several user comments for example. Users can create their own comments, but you only want them to be able to take up a given amount of screen resource, and then perhaps have a “…more” link at the bottom if they go over.
How can I best setup this in Rails? e.g.
(1) How to setup the layout/CSS so that if more text / content is present in the DIV area that can be displayed that the DIV area doesn’t expand due to the extra content the user put forward, and/or
(2) How to calculate how much text/content can fit in the current size of the DIV (noting browser re-sizing) so that you get the chance to put the “…more” link at the bottom?
Any other suggestions welcome that address what I’m trying to do are welcome, which is really offering a area for display of user feedback where each piece of feedback has a maximum area it can take on the main screen only, and also that browser re-sizing is possible.