简体   繁体   English

水平表格版式中发生换行的区别

[英]a difference of line break occuring in horizontal Form Layout

i have to create a form which contains a lot of label and forms like text area ,radio etc.but when i apply bootzstrap horizontal form method it is giving one line difference between label and text area here is my code 我必须创建一个包含很多标签和文本区域,收音机等形式的表单,但是当我应用bootzstrap水平表单方法时,它在标签和文本区域之间给出了一行区别,这是我的代码

<!DOCTYPE HTML>
<html>
  <head>
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
  </head>
  <body>

    <script type="text/javascript"
     src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script> 
    <script type="text/javascript"
     src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
    </script>
  <form class="form-horizontal">
    <div class="control-group">
  Promo description *
    <div class="controls">
      <textarea rows="3"></textarea>
    </div>
  </div>
  </form>
  </body>
<html>

and the one line difference here is the screen shot how to make label and textarea perfectly horizontal ??any guideline 和这里的一线区别是屏幕快照,如何使标签和文本区域完美地水平? 在此处输入图片说明

Define in css margin-top: -10px; 在CSS中定义margin-top: -10px; or something like that? 或类似的东西? Guess that will put it next to your text aswell. 猜猜这也会把它放在您的文本旁边。

You should follow the format described in Forms . 您应该遵循Forms中描述的格式

<form class="form-horizontal">
  <div class="control-group">
    <label class="control-label">Promo description *</label>
    <div class="controls">
      <textarea rows="3"></textarea>
    </div>
  </div>
</form>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM