confused and dazed Posted February 28, 2013 Share Posted February 28, 2013 Hello internet. I am having an issue figuring out how to get text to type only in the visible text box on the screen and not scroll through on one line when typing. I have tried using textarea and placing callouts for wrap,rows,cols but that does not seem to work. How do I get the text to wrap? Here is my textbox code I have in the <head> tag BUT when text is being typed in the box it only shows on the first line. I want it to wrap in the text box on the screen. Please help. <style type="text/css">.commentbox {width:200px; height:72px}</style> Link to comment Share on other sites More sharing options...
jeffman Posted February 28, 2013 Share Posted February 28, 2013 What you're asking for is the default behavior. Something else must be going on, and it's not the height or width. Does it do this in more than one browser? Do you have a link? Link to comment Share on other sites More sharing options...
confused and dazed Posted February 28, 2013 Author Share Posted February 28, 2013 I do not have a link yet. Preparing to launch the site at the moment...If it is the default way of handling wrapping how do I style it to get the desired effect? Link to comment Share on other sites More sharing options...
jeffman Posted February 28, 2013 Share Posted February 28, 2013 I think you misunderstand. What you HAVE is not the default. Something is wrong. Something in your code is overriding the default behavior somehow. You shouldn't have to ADD anything at all. That's why someone has to look at your code, to find out what's wrong. (It can't possibly be only the little bit of CSS you posted above.) A link to a live site would be best. Link to comment Share on other sites More sharing options...
confused and dazed Posted February 28, 2013 Author Share Posted February 28, 2013 THIS CODE IS IN THE <HEAD><style type="text/css">.commentbox {width:200px; height:72px}</style>THIS CODE IS IN A <FORM> WITHIN A <TABLE> <tr> <td align=center>Insert your Comments here:</td> <td align=center><input type=textbox class="commentbox" maxlength="240" name="mbC" value=""></td> </tr> Link to comment Share on other sites More sharing options...
jeffman Posted February 28, 2013 Share Posted February 28, 2013 Your first post said it was a textarea. A text input behaves exactly the way you describe. If you want wrapping, you want a textarea. Link to comment Share on other sites More sharing options...
confused and dazed Posted March 1, 2013 Author Share Posted March 1, 2013 Are you saying that I cannot style an input to wrap text?Yes my original note said textarea (sorry for not pasting the right code) and I tried using text area instead of textbox but it still did not work. I used this code: THIS CODE IS IN THE <HEAD><style type="text/css">.commentbox {width:200px; height:72px}</style>THIS CODE IS IN A <FORM> WITHIN A <TABLE><tr><td align=center>Insert your Comments here:</td><td align=center><input type=textarea class="commentbox" maxlength="240" name="mbC" value=""></td></tr> Link to comment Share on other sites More sharing options...
dsonesuk Posted March 1, 2013 Share Posted March 1, 2013 textarea is not a type of input, it is its own specific element, which is done as <textarea class="commentbox" name="mbC">Content OR value resides in here</textarea> Link to comment Share on other sites More sharing options...
confused and dazed Posted March 1, 2013 Author Share Posted March 1, 2013 Deirdre's Dad - Thanks.dsonesuk - As always thanks much! That did the trick! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now