Connecting Tech Pros Worldwide Forums | Help | Site Map

adjusting textbox height

ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#1: Oct 3 '08
Im trying to adjust the height of my text box and even I put height=100 still it display as regular text box. How can I make it larger?

Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="description"  
  2. size="80" height="100" >

Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#2: Oct 4 '08

re: adjusting textbox height


Hi.

Seeing as this is in no way related to PHP, I am gong to move this over to the HTML/CSS forum.

Please try to post your questions in the appropriate forums.

Thanks
MODERATOR
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#3: Oct 4 '08

re: adjusting textbox height


Have you considered the <textarea> element?

Or, if you want to use a normal textbox, you could try setting the CSS style, rather then use the ancient "height" attribute.

Like:
Expand|Select|Wrap|Line Numbers
  1. <input type="text" style="height: 100px;" />
The best way would of course be to include this in an external CSS stylesheet, but that is hardly worth creating one if you don't already use them.

Note that this will not add more lines to the box, it will only stretch the height around that single line. If you need multiple lines, use <textarea>
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#4: Oct 6 '08

re: adjusting textbox height


this is a code under my my php script its not a html file
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: Oct 6 '08

re: adjusting textbox height


Yes, but the generated code is HTML.
Atli's Avatar
Moderator
 
Join Date: Nov 2006
Location: Iceland
Posts: 3,754
#6: Oct 6 '08

re: adjusting textbox height


Quote:

Originally Posted by ddtpmyra

this is a code under my my php script its not a html file

The first thing any PHP tutorial teaches is that PHP is usually used to generate HTML. Even tho your HTML is within a PHP file, it is still HTML and can therefor be used just as you would use it in a HTML file.
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#7: Oct 7 '08

re: adjusting textbox height


thanks for the information Atli
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#8: Oct 14 '08

re: adjusting textbox height


Here's what I did and It work as I expected.

Quote:
<textarea name="description" rows="5" cols="40"></textarea>
Reply