2016-03-20 48 views
1

我試圖讓自舉輸入,像這樣:http://www.bootply.com/CGvw04ljGK
好吧!這個Bootply例子就是我想要做的。但是當我在我的頁面中嘗試這個時,這不起作用。需要注意的是空間像消失的圖像:enter image description here引導程序輸入之間的空間不工作?

這是我的代碼:

<%@page contentType="text/html" pageEncoding="UTF-8"%> 
<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> 
    <link href="http://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet" type="text/css"> 
    <link href="http://fonts.googleapis.com/css?family=Lato" rel="stylesheet" type="text/css"> 
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> 
    <link rel="stylesheet" type="text/css" href="../css/todo.css"> 
    <style type="text/css"> 
     #myPage{ 
      overflow-x:hidden; 
     } 
    </style> 
</head> 
<body id="myPage" data-spy="scroll" data-target=".navbar" data-offset="60"> 
    <div class="container-fluid"> 
     <div class="row"> 
      <div class="col-md-8 col-md-offset-2 white-color"> 
       <h1>Cadastro de Produtos</h1> 
       <form id="novoProdutoForm" method="post" class="form-horizontal container-fluid"> 
        <div class="row"> 
         <div class="col-md-4 form-group"> 
          <input type="text" class="form-control"> 
         </div> 
         <div class="col-md-4 form-group"> 
          <input type="text" class="form-control"> 
         </div> 
         <div class="col-md-4 form-group"> 
          <input type="text" class="form-control"> 
         </div> 
        </div> 
       </form> 
      </div> 
     </div> 
    </div> 
</body> 
</html> 

任何人都可以幫助嗎?我想在輸入之間放置空格。

感謝

+0

使用窗體類「form-inline」,以便form-group獲得所需的空間。這些類涉及。 –

+0

你能舉個例子嗎? –

+0

試試這個其他職位:http://stackoverflow.com/questions/23581571/twitter-bootstrap-3-form-horizo​​ntal-and-multiple-input-columns-on-single-line –

回答

1

從表單標籤中取出的形式,水平一流,你是準備好:)

+0

謝謝你!你是對的...這是有效的! –

+0

沒問題繼續編碼:) –

1

嘗試增加其他的div周圍的投入是這樣的:

<div class="col-sm-4"> 
    <div> 
     <input class="form-control"> 
    </div> 
</div> 

讓我知道,如果它的工作原理:)

+0

是的男人,這個作品。 –

+0

我很高興我們發現了錯誤! :)如果你把我的答案標記爲正在工作,會很感激嗎? :3 – callmeniko

+0

對不起,但另一個答案比這更好,因爲告訴我我做錯了什麼。其餘的代碼是正確的。你的回答給了我一個解決問題的替代代碼。 –

相關問題