Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-18-2013, 09:07 AM   PM User | #1
gayathri
New Coder

 
Join Date: Nov 2012
Location: chennai
Posts: 55
Thanks: 29
Thanked 0 Times in 0 Posts
gayathri is an unknown quantity at this point
PHP-form textarea dimension.

Is it possible to change the width and height of textarea.If means please tell me how to do that.
The following is my code.
PHP Code:
<tr>

            <
td>
            
Question<font color="red">*</font>
            </
td>
            <
td>
            :
            </
td>
            
            <
td><textarea name="ques1" id="ques1" cols="25" rows="5" style="resize:none;"></textarea>
            </
td>
            <
td>
                <
table>
                <
tr>
                <
td width="10">
                <
div style="background-image:url(img/mic1_30.jpg); width:30px; height:25px;" >
                <
input type="file" id="quest_wav1" name="quest_wav1"  style="opacity:0;-moz-opacity:0 ;filter:alpha(opacity: 0);" size="1"  />
                </
div>
                </
td>
                </
tr>
                <
tr>
                <
td width="10">
                <
div style="background-image:url(img/img1.jpeg); width:30px; height:30px;" >
                <
input type="file" id="quest_img1" name="quest_img1"  style="opacity:0;-moz-opacity:0 ;filter:alpha(opacity: 0);" size="1"   />
                </
div>
                </
td>
                </
tr>
                </
table>
            </
td>
            <
td>&nbsp;</td>
            
        </
tr>
        <
tr>
            <
td>Page No<font color="red">*</font></td><td>:</td>
            <
td><input type="text" name="pno" id="pno"  size="16" onkeypress="return isNumberKey(event, this.value)"/></td>
            <
td>Chapter No<font color="red">*</font></td><td>:</td>
            <
td><input type="text" name="cno" id="cno" size="16"  onkeypress="return isNumberKey(event, this.value)"/></td>
            </
tr
Please tell me i've to increase the size of textarea for the question field only. Please tell me how to do that.
gayathri is offline   Reply With Quote
Old 02-18-2013, 12:37 PM   PM User | #2
djm0219
Senior Coder

 
djm0219's Avatar
 
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,229
Thanks: 2
Thanked 190 Times in 188 Posts
djm0219 is on a distinguished road
Change the rows value for the textarea. This has nothing at all to do with PHP BTW.
__________________
Dave .... HostMonster for all of your hosting needs
djm0219 is offline   Reply With Quote
Old 02-18-2013, 02:21 PM   PM User | #3
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,751
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Quote:
Originally Posted by djm0219 View Post
Change the rows value for the textarea. This has nothing at all to do with PHP BTW.
Yep it sure doesn't. Moving to HTML/CSS forum.
rows and cols are the attributes you want to set. I'm not really up with my html/css knowledge so I don't know if there is a more generic way to do it, but the rows and cols properties appear to still be a part of the html5 standard.
__________________
PHP Code:
header('HTTP/1.1 420 Enhance Your Calm'); 
Fou-Lu is offline   Reply With Quote
Old 02-18-2013, 06:03 PM   PM User | #4
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,532
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You should specify rows and cols on a textarea to define a default size for it. You can then override that using CSS if you need to (for those people whose browsers support CSS styling of forms).
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 02-19-2013, 06:09 AM   PM User | #5
gayathri
New Coder

 
Join Date: Nov 2012
Location: chennai
Posts: 55
Thanks: 29
Thanked 0 Times in 0 Posts
gayathri is an unknown quantity at this point
Actually all the fields are inside a table. So by increasing the size or rows and cols attribute,all other fields move aside in a form.So is there any other option in table tag for doing this. Please tell me.

Last edited by gayathri; 02-19-2013 at 06:13 AM..
gayathri is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:13 PM.


Advertisement
Log in to turn off these ads.