2016-01-20 59 views
0

存在與形式aliging一個問題...Form Aligning問題|引導

這裏就是我試圖做... 做一個接觸的形式在左邊和右邊把公司的標誌..

COL-MD-6於是兩個div由..在第一個div我把形式與類的「形式橫」

因此我安排表單標籤中的「COL-MD-2 「並在」col-md-4「中創建表格字段

然而,這些表單標籤和字段是並排的...檢查圖像...

enter image description here

這裏是代碼...

<section id="contact"> 

    <div class="col-md-12 text-center" style="background-image: url('images/head-background.png'); height: 100px; margin: 120px 0 10px 0;"><h2 style="margin-top:40px;">Contact Us</h2></div> 

     <div class="col-md-6"> 

      <div style="font-family:'MV Boli'; font-size: 20px;"> 

       <h4>Reach Us</h4> 

        <form class="form-horizontal"> 

         <div class="form-group"> 

          <label for="name" class="col-md-2 control-label">Name</label> 

          <div class="col-md-4"> 

           <input type="text" name="name" placeholder="Your name" class="form-control"> 

          </div> 



          <label for="email" class="col-md-2 control-label">E-Mail</label> 

          <div class="col-md-4"> 

           <input type="email" name="email" placeholder="Your E-Mail" class="form-control"> 

          </div> 

         </div> 

        </form> 



      </div> 

     </div> 

     <div class="col-md-6"> 


      <img src="images/logo-vertical.png" class="img-thumbnail"> 


     </div> 

<section> 

請幫助的人,在關閉我的第一個網頁設計項目:)

回答

0

瀕臨你並不需要使容器col-md-12適合您的形式和圖像。只需做出相同的結構

<div class="container"> 
    <div class="row"> 
    <div class="col-md-6"> 
     form here 
    </div> 
    <div class-"col-md-6"> 
     // your image 
    </div> 
    </div> 
</div> 
1

我認爲這是您的需要,請嘗試這個,這不是您的需要請給我清楚的輸入,

<section id="contact"> 

    <div class="col-md-12 text-center" style="background-image: url('images/head-background.png'); height: 100px; margin: 120px 0 10px 0;"><h2 style="margin-top:40px;">Contact Us</h2></div> 

     <div class="col-md-6"> 

      <div style="font-family:'MV Boli'; font-size: 20px;"> 

       <h4>Reach Us</h4> 

        <form class="form-horizontal"> 

         <div class="form-group"> 

          <label for="name" class="col-md-2 control-label">Name</label> 

          <div class="col-md-12"> 

           <input type="text" name="name" placeholder="Your name" class="form-control"> 

          </div> 



          <label for="email" class="col-md-2 control-label">E-Mail</label> 

          <div class="col-md-12"> 

           <input type="email" name="email" placeholder="Your E-Mail" class="form-control"> 

          </div> 

         </div> 

        </form> 



      </div> 

     </div> 

     <div class="col-md-6"> 


      <img src="images/logo-vertical.png" class="img-thumbnail"> 


     </div> 

<section>