stuart7398 Posted April 7, 2008 Share Posted April 7, 2008 hi. i have a form with a text area for my users to post a small description of their item onto their page. the problem is the text just continues across the page. how do i stop the? thanks, stuart. <code> this is the form area <div class="about_me"><span class="hidden"># </span>item description . . .<br /><textarea name="des" style="width: 280px; height: 100px" cols="1" rows="6" onKeyDown="limitText(this.form.message,this.form.countdown,350);" onKeyUp="limitText(this.form.des,this.form.countdown,350);"></textarea> <font size="1"><br />Please be as brief as possible (Maximum characters: 350)<br /> You have <input readonly="readonly" name="countdown" size="3" value="350" /> characters left. </code> <code> this is the preview page <div class="des">description . . .<br /></div><?=stripslashes($_POST['des'])?> </code> Link to comment https://forums.phpfreaks.com/topic/99915-form-text-area-problem/ Share on other sites More sharing options...
poleposters Posted April 7, 2008 Share Posted April 7, 2008 Hi Stuart. Just to make sure. Do you mean the text breaks out of the text area box when your user enters the decription? Or do you mean it breaks out of the page when you view the preview? If the problem is when you view the preview, then itsa problem with your HTML/CSS. Try changing your code to post the description within the div class="des". That way the description is bounded by the width/height you specify in your CSS file. <code> this is the preview page <div class="des">description . . . <?=stripslashes($_POST['des'])?></div> I hope it works. </code> Link to comment https://forums.phpfreaks.com/topic/99915-form-text-area-problem/#findComment-511381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.