user3922546 user3922546 - 4 months ago 7
HTML Question

changing size of address field within table environment in html

I'm new to html. I have a project in which I have been asked to align the labels in the fieldset element. That is why I'm using the table environment. Probably because of that, if I try to set the size of the address field using rows and cols, there is no change. I have the following code:



<fieldset class="">
<legend>Your Contact information</legend>
<table>
<tr>
<label for="mail"></label>
<td align="right">Email: </td>
<td align="left"><input type="email" name="mail" id= "mail" value="" required>
</tr>
<tr>
<label for="mob"></label>
<td align="right">Mobile: </td>
<td align="left"><input type="tel" name="mob" id = "mob" value="">
</tr>
<tr>
<label for="add"></label>
<td align="right">Address: </td>
<td align="left"><input type="textarea" rows = "4" cols = "20" name="add" id = "add" value="">
</tr>
</table>
</fieldset>




Answer

I would use CSS to resize them.

 <tr>
  <label for="mail"></label>
  <td align="right">Email: </td>
  <td align="left"><input type="email" name="mail" id= "mail" style="width:200px; height:200px;" value="" required>
</tr>

This should work.

Comments