View Full Version : help - truncated content in the middle of an html tag

05-23-2006, 07:08 PM

im using a cms that truncates content after 300 characters and sometimes the truncation is in the middle of an html tag (a href, span, etc.). When the content is truncated in the middle of a tag, the tag shows (which makes the UI downright ugly). Sooo....I was wondering is there a way to keep content together so that if a tag is in the middle of a truncation...that tag will be pushed to a new line? is there a special div tag or javascript function that can do this?

i know it sounds confusing but, please ask questions for clarification.


05-23-2006, 07:15 PM
it is confusing, indeed... Well, javascript can not change the real line structure of a page, it is only a dynamic language.... Changes are "virtual", available only durring the session.

05-23-2006, 07:26 PM
here's a visual:


05-23-2006, 08:04 PM
There's no easy way to solve your problem dynamically. Your best bet is to count your characters before you put them in your CMS.