spiceydog Posted July 19, 2008 Share Posted July 19, 2008 Word Wrap is probably the wrong word but I have some MySQL being returned (using php) into a text area on my webpage and I find that the textarea is automatically word wrapping it. By word wrapping I mean what Notepad does when Word Wrap is turned on. I want to turn it off. How can I do this? The php that is being returned is a link such as http://www.phpfreaks.com/forums/index.php?action=post;board=4.0 but it looks like http:// www.phpfreaks.com/ forums/ index.php?action=po st;board=4.0 in the text box because it doesn't all fit on one line. I want it to be forced onto one line however some of the data in the MySQL database includes multiple links on multiple lines so I can't just tell it to equal 1 row and be done with it. But I DO want the bottom scroll bar and side scroll bar to work. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
atrum Posted July 20, 2008 Share Posted July 20, 2008 Read up on css, there is a way to do it there.. The only thing I am not sure about is using it in a textarea. but worth a try:) p { white-space: nowrap; } Quote Link to comment Share on other sites More sharing options...
atrum Posted July 20, 2008 Share Posted July 20, 2008 Ether that or you can just size the textarea to the size of a standard input text box using col and row values. (i know dumb suggestion, but what ever works.) Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted July 21, 2008 Share Posted July 21, 2008 Ether that or you can just size the textarea to the size of a standard input text box using col and row values. (i know dumb suggestion, but what ever works.) You are better off styling the size of the textarea with css. This way you can be more explicate on the size of the textarea to the pixel! If the nowrap doesn't solve your issue, then your mysql/php output is creating whitespace. Make sure there is no /r /n characters in the output. I'm not an expert at php, but something like that... Quote Link to comment Share on other sites More sharing options...
spiceydog Posted July 21, 2008 Author Share Posted July 21, 2008 thank you guys!! i tried the css technique and it worked great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.