I am writing a script that pulls in my site's RSS and displays it to the user as html in a nice looking box. Due to the small size of this box (only 180 px), the rss titles go to the edge and cuts off the last few letters, making it look odd...
So, for the title "My Really Really Really Long Title", it would show this:
|------------------------------|
|My Really Really Really Lo|
|------------------------------|
I want it to remove all characters after a certain amount of characters and put a ... after it so that it would display:
|--------------------------|
|My Really Really Rea...|
|--------------------------|
How would I do that? I'd prefer not to edit my current code and just add more if possible. Does that make sense? Thanks in advance!
I'm writing it in javascript and html and the file type is a .html. I've seen it done in javascript before, so I know it is possible, but I don't remember where or how they did it...
So, for the title "My Really Really Really Long Title", it would show this:
|------------------------------|
|My Really Really Really Lo|
|------------------------------|
I want it to remove all characters after a certain amount of characters and put a ... after it so that it would display:
|--------------------------|
|My Really Really Rea...|
|--------------------------|
How would I do that? I'd prefer not to edit my current code and just add more if possible. Does that make sense? Thanks in advance!
I'm writing it in javascript and html and the file type is a .html. I've seen it done in javascript before, so I know it is possible, but I don't remember where or how they did it...