带有文本区域的垂直中心标签,带有选择和带有文本框 [英] Vertical center label with text area and with select and with textbox

查看:139
本文介绍了带有文本区域的垂直中心标签,带有选择和带有文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我水平并排:标签和文本区域;标签和选择。我想这样做:


  1. 选择输入垂直居中,并选择该标签。举例来说,选择标签占用5行,那么选择应排列起来,因此它看起来与标签中的第3行并排在同一垂直层上。如果标签文本是一行高,那么标签和选择在同一水平上是垂直的。如果标签文本的高度为2行,则选择内容应该位于两行之间的水平线上。

  2. 对于文本区域,标签文本垂直居中文本区域和文本区域与标签垂直居中。假设文本区域高5行,标签高度为1行,则标签应该与文本区域中的第3行显示为水平。假设文本区域高2行,标签高4行,那么文本区域应该与标签中间的2行一致。 文本框类似于第1项,文本框与标签中间的中间行对齐。 p>

     < div class =fieldSet>< fieldset> 
    < p>
    < label class =fieldfor =name>名称:< / label>
    < input id =nametype =textname =nameclass =textbox>
    < / p>
    < p>
    < label class =fieldfor =life>生活号码:< / label>
    < input id =lifetype =textname =lifeclass =textboxstyle =width:85px;>
    < label class =fieldfor =annual>年度Blah Blah Blah Blah Blah Blah Blah Blah Blah编号:< / label>
    < input id =annualtype =textname =annualclass =textboxstyle =width:85px;>
    < label class =fieldfor =maleFemalestyle =width:125px;> M / F:< / label>
    < input id =maleFemaletype =textname =maleFemaleclass =textboxstyle =width:40px;>
    < / p>
    < p>
    < label class =fieldfor =runYesNo>正在运行,是/否?:< / label>
    < option value =?选择>是/否< /选项>
    < option value =是>是< / option>
    < option value =No>否< / option>
    < / select>
    < / p>
    < p>
    < label class =fieldfor =评论>评论:< / label>