6 Replies Latest reply: Mar 8, 2013 8:19 AM by jyeager11 RSS

    Truncating text instead of wrapping it...

    jyeager11 Community Member

      I might be wishing for something that isn't technically possible, but I thought I'd ask anyway.

       

      I'm looking for a text truncator that will calculate how much room is on a text line, and if the text exceeds the horizontal space alotted, it cuts it off and adds a "..." at the ennd.

       

      Naturally, because a line with OOOO's and a line with iiii's take up considerably different amounts of horizontal space, simply going with a fixed number of characters is not a viable solution. It almost has to be a pixel width.

       

      Is this at all do-able?

       

      I am open to javascript/jquery solutions as well as css.