gaya Posted February 19, 2013 Share Posted February 19, 2013 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. <tr> <td> Ques:<font color="red">*</font> </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> </td> </tr> <tr> <td>Pno<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>Cno<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. Link to comment Share on other sites More sharing options...
RezaRohani Posted February 19, 2013 Share Posted February 19, 2013 (edited) Yes! It's possible and is very easy. like this: <textarea name="ques1" id="ques1" cols="25" rows="5" style="resize: none; height: 16px; width: 300px;"></textarea> Do you mean this?! But it is better than "resize"property do not use. Because it prevents the scrolling and is not as well known in some browsers. Instead, you can use this code: <textarea name="ques1" id="ques1" cols="25" rows="5" style="height: 60px; width: 280px; max-height: 60px; min-height: 60px; max-width: 280px; min-width:280px;"></textarea> Edited February 19, 2013 by RezaRohani Link to comment Share on other sites More sharing options...
gaya Posted February 19, 2013 Author Share Posted February 19, 2013 (edited) <form accept-charset="utf-8" action="a.php" method="post" name="choose" enctype="multipart/form-data" onSubmit="return validate();"><table align="center" border="1" width="850" height="500" bgcolor="FFF5EE" ><tr><td><table align="center" bgcolor=""> <tr><td align="center" colspan="10"><img src="img/laugh.gif" alt="Smiley" /></td></tr> <tr><td align="center" style="color:#FF0000; text-decoration:blink;" colspan="10" ><b><?php echo $qtype2;?></b></td></tr> <tr><td colspan="10"> </td></tr> <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> </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> </td> <td> </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> <td> </td> <td> </td> </tr> <tr> <td>Board</td><td>:</td> <td><input type="text" name="board_txt" id="board_txt" size="16" readonly="" value="<?php echo $boardname; ?>" style="background-color:#FFFFFF;" /></td> <td> </td> <td> </td> <td>Subject</td><td>:</td> <td><input type="text" name="subject_txt" id="subject_txt" size="16" readonly="" value="<?php echo $subjectname; ?>" style="background-color:#FFFFFF;" /> <input type="hidden" name="language" id="language" value="<?php echo $language_name; ?>" /> <input type="hidden" name="qtype" id="qtype" value="<?php echo $qtype2; ?>" /> </td> <td> </td> <td> </td> </tr> <tr> <td>Short Type</td> <td>:</td> <td> <select id="short_type" name="short_type" > <option value="" selected="selected">----</option> <option value="Problem" >Problem</option> <option value="Deleted">Deleted</option> </select> </td> <td> </td> <td> </td> </tr> <tr><td colspan="10"> </td></tr> <tr> <td><font color="#FF0000"><b>Note :</b></font></td> <td colspan="2" align="center"><font color="#FF0000">*</font> Mandatory Fields</td> <td colspan="3" align="left"><img src="img/mic1_30.jpg" alt="Upload Wave" />Upload WAVE</td> <td colspan="4" align="left"><img src="img/img1.jpeg" alt="Upload Image" />Upload IMAGE</td> </tr> <tr> <tr><td colspan="10"> </td></tr> <td colspan="10" align="center"> <input type="submit" name="add" value="Add" style="background-color:#FFFF00; font:Arial, Helvetica, sans-serif; color:#FF0000"/> <input type="reset" name="clear" value="Clear" style="background-color:#FFFF00; font:Arial, Helvetica, sans-serif; color:#FF0000" /> </td> </tr> </table></td></tr></table></form> The above is my formWhat What i want to do is i need to equalise the fields.As the question field nearby is empty space. But the other subject is in right side and board in left side.But no fields is seen nearby question field. Simply i want to fill the space. Edited February 19, 2013 by gaya Link to comment Share on other sites More sharing options...
RezaRohani Posted February 19, 2013 Share Posted February 19, 2013 I'm not sure I understand exactly what you mean, but as I understand it, you want something like this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <style type="text/css"> .fs { margin: 0px auto; width: 850px; height: 500px; background-color: #FFF5EE; } .dot-col { width: 1px; } .text-col { width: 320px; } .txt { resize: none; width: 100%; margin: 1px; padding: 2px; } </style></head><body> <fieldset class="fs"> <legend>Smiley</legend> <form accept-charset="utf-8" action="a.php" method="post" name="choose" enctype="multipart/form-data" onsubmit="return validate();"> <table style="width: 100%"> <tr> <td align="center" colspan="6"> <img src="img/laugh.gif" alt="Smiley" /> </td> </tr> <tr> <td align="center" colspan="6" style="color: #FF0000; text-decoration: blink;"> <b><?php echo $qtype2;?></b> </td> </tr> <tr> <td colspan="6"> </td> </tr> <tr> <td align="right"> Question<font color="red">*</font> </td> <td class="dot-col"> : </td> <td class="text-col" colspan="2"> <textarea name="ques1" id="ques1" rows="5" class="txt" onclick="return ques1_onclick()"></textarea> </td> <td> </td> <td class="text-col"> <div style="background-image: url(img/mic1_30.jpg); width: 30px; height: 25px;"> <input type="file" id="quest_wav1" name="quest_wav1" size="1" /> </div> <div style="background-image: url('img/img1.jpeg'); width: 30px; height: 30px; direction: ltr;"> <input type="file" id="quest_img1" name="quest_img1" size="1" /> </div> </td> </tr> <tr> <td align="right"> Page No<font color="red">*</font> </td> <td> : </td> <td class="text-col"> <input type="text" name="pno" id="pno" size="16" onkeypress="return isNumberKey(event, this.value)" class="txt" /> </td> <td align="right"> Chapter No<font color="red">*</font> </td> <td class="dot-col"> : </td> <td class="text-col"> <input type="text" name="cno" id="cno" size="16" onkeypress="return isNumberKey(event, this.value)" class="txt" /> </td> </tr> <tr> <td align="right"> Board </td> <td> : </td> <td> <input type="text" name="board_txt" id="board_txt" size="16" readonly="" value="<?php echo $boardname; ?>" class="txt" /> </td> <td align="right"> Subject </td> <td> : </td> <td> <input type="text" name="subject_txt" id="subject_txt" size="16" readonly="" value="<?php echo $subjectname; ?>" class="txt" /> </td> </tr> <tr> <td align="right"> Short Type </td> <td> : </td> <td> <select id="short_type" name="short_type" class="txt"> <option value="" selected="selected">----</option> <option value="Problem">Problem</option> <option value="Deleted">Deleted</option> </select> </td> <td> </td> <td> </td> <td> </td> </tr> <tr> <td colspan="6"> </td> </tr> <tr> <td align="right"> <font color="#FF0000"><b>Note </b></font> </td> <td> <font color="#FF0000"><b>:</b></font> </td> <td> "<font color="#FF0000">*</font>" Mandatory Fields. </td> <td> <img src="img/mic1_30.jpg" alt="Upload Wave" />Upload WAVE </td> <td> </td> <td> <img src="img/img1.jpeg" alt="Upload Image" />Upload IMAGE </td> </tr> <tr> <td colspan="6"> </td> </tr> <tr> <td align="center" colspan="6"> <input type="submit" name="add" value="Add" style="background-color: #FFFF00; font: Arial, Helvetica, sans-serif; color: #FF0000" /> <input type="reset" name="clear" value="Clear" style="background-color: #FFFF00; font: Arial, Helvetica, sans-serif; color: #FF0000" /> </td> </tr> </table> </form> </fieldset></body></html> I placed your form in an HTML page. Also I removed "opacity" css property from your "select" tags to show them. Please try it. I it hop be helpfull... Link to comment Share on other sites More sharing options...
gaya Posted February 19, 2013 Author Share Posted February 19, 2013 Thanks RezaRohani. It also works. But in the above code what i posted i simply close the </table> before pageno and opened a new <table>. 1 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