CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   PHP-form textarea dimension. (http://www.codingforums.com/showthread.php?t=287822)

gayathri 02-18-2013 09:07 AM

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.

djm0219 02-18-2013 12:37 PM

Change the rows value for the textarea. This has nothing at all to do with PHP BTW.

Fou-Lu 02-18-2013 02:21 PM

Quote:

Originally Posted by djm0219 (Post 1314110)
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.

felgall 02-18-2013 06:03 PM

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).

gayathri 02-19-2013 06:09 AM

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.


All times are GMT +1. The time now is 05:34 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.