我有一个表格,但我的标签不在文本区域的同一行中

I have one form and my label is not in the same line of text area

 
<tr> 
  <td valign="top" width="25%" class="contact-form" id="require">Or please give us a description of your requirements (Max:1000 characters)<font color="red" size="3">*</font>
  </td> 
  <td width="5%" class="contact-form">:</td>
  <td width="70%" class="contact-text-form"><textarea name="requirements" class="contact-form-filds2" id="requirements" cols="1000" rows="3" value="<?php echo htmlspecialchars($require);?>" ></textarea><span class="error"><?php echo $requireErr;?></span></td>
</tr>

或者请给我们描述您的要求(最多:1000 个字符)* : " >

您可以将其写在 table 的 <tr></tr> 元素中,以便在没有 valign 属性的情况下正确对齐。每个标签,文本字段只有一行才能正确显示。

在您的 css 样式表中,只需添加:

textarea {
  vertical-align:top;
}