【问题标题】:check boxes not aligned in div复选框未在 div 中对齐
【发布时间】:2013-10-18 15:19:57
【问题描述】:

我有一个带有复选框的 div 表单,复选框相对于文本行太低了,

缺少什么使它垂直对齐?,,谢谢!

<div id="dialog-form2" title="Titulo">
<p class="validateTips">All form fields are required.</p>
<form>
<fieldset>
<label for="name">Your name</label>
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
<label for="email">Your email</label>
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all" />
<label for="email">Your phone number</label>
<input type="text" name="phone" id="phone" value="" class="text ui-widget-content ui-corner-all" />
<label for="password">Your Member Number</label>
<input type="password" name="password" id="password" value="" class="text ui-widget-  content ui-corner-all" />

<br>
Enquiry<br>
<input type="checkbox" name="option1" value="Milk"> I would like to r <br>
<input type="checkbox" name="option2" value="Butter">I need a h <br>  
<input type="checkbox" name="option2" value="Butter">Please email me with offer details<br>  
<input type="checkbox" name="option2" value="Butter">Please call me to discuss offer<br>  
<input type="checkbox" name="option2" value="Butter">Other?<br>  

</fieldset>
 </form>
</div>

【问题讨论】:

    标签: html checkbox vertical-alignment


    【解决方案1】:

    在不知道您的样式表是什么样子的情况下很难回答这个问题。甚至您的字体/字体大小也会在一定程度上影响这一点。例如,只是将您的代码粘贴到一个空白的 html 文件中并在浏览器对齐中显示它有点不对劲,因为它使用 Times 作为我的字体,但是如果我将正文字体更改为 arial,它会排列得很好。仅仅剪掉这个没有关联的 css 就很难像你需要的那样清楚地回答这个问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-11-08
      • 1970-01-01
      • 2018-03-02
      • 2012-10-30
      • 2014-12-14
      • 2016-08-10
      • 2014-01-19
      • 2017-12-14
      相关资源
      最近更新 更多