shadowayex Posted May 22, 2008 Share Posted May 22, 2008 I have a <div> that gets information written in it. I have the overflow set to auto and a fixed height so the div won't expand when it gets full. But a friend of mine discovered that if he typed a really long string of letters, it would put a scroll on the bottom and you'd hve to scroll to see the whole word. I was wondering if there was a way to make it so the string would be broken if it reached the width limit. Link to comment Share on other sites More sharing options...
newseed Posted May 22, 2008 Share Posted May 22, 2008 Seems like to me you are too concern about a string of letters because normally people would not do it like this:typingonglongstringofletterswithoutspacesisonlyaproblemifsomeoneissillyenoughtodoitandiftheydosomethinglikethisthenobviouslytheyarewastingyourtimeYou could give your div a fixed width but I don't think that will work but only for some odd browsers.Of course there is word-wrap: break-word; but it doesn't work for Firefox and a few other browsers. Link to comment Share on other sites More sharing options...
jeffman Posted May 22, 2008 Share Posted May 22, 2008 I agree. Anyone who does this deserves a crappy user experience. People knows what's up. Let 'em get what they deserve. Link to comment Share on other sites More sharing options...
webflex Posted May 22, 2008 Share Posted May 22, 2008 Hi,For that use a script like JavaScript or PHP.Dont ask me what script, but there are a lot of them over the internet.Complements \o/ Link to comment Share on other sites More sharing options...
shadowayex Posted May 23, 2008 Author Share Posted May 23, 2008 Well, what caused it was my buddy was testing it in IE7 and I was trying to make it faster, but I guess when I set the setInterval time to fast, it got really slow on IE and my friend typed no with a whole bunch of o's. But I suppose you're right. Besides, I added an option so admins can delete messages anyways so I could remove it without clearing the whole chat. Thanks anyways. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.