2016-05-22 4 views
1

divを別のdivに配置しようとしていますが、以下のすべてのコードがカスタムCSSが追加されないようにブートストラップのCSSを変更しませんでした。ここ bootstrap 3 z-index別のdivにdivを配置する

<div class="col-lg-3 listing-panel side-bar-for-single-listing" style="margin-top: 10px;"> 

     <div class="col-lg-12" style="z-index: 999; background: red; height: 40%;"> </div> 

     <form class="col-lg-12" style=" "> 

      <legend>Contact</legend> 

      <div class="form-group"> 
       <label for="IDinputName">Name*</label> 
       <input type="text" class="form-control" id="IDinputName" placeholder="Name"> 
      </div> 

      <div class="form-group"> 
       <label for="IDinputMobile">Mobile*</label> 
       <input type="text" class="form-control" id="IDinputMobile" placeholder="Mobile" > 
      </div> 

      <div class="form-group"> 
       <label for="IDinputMessage">Message*</label> 
       <textarea id="IDinputMessage" class="form-control" style="height: 100px;"></textarea> 
      </div> 



      <button type="submit" id="IDcontactSubmitBtn" class="btn btn-primary">Send</button> 

     </form> 

    </div> 

は、私は赤いボックスは、フォーム要素の100%をカバーしたいのか、私は、現在抱えているです:

enter image description here

答えて

1

これを試してみましょう!私はそれが助けることを望む! :)

<div class="col-lg-12" style="background: red none repeat scroll 0% 0%; position: absolute; left: 0px; top: 0px; height: 100%; z-index: -1; right: 0px; margin: 0px auto;"> </div>

0

あなたは、zインデックスを持つdiv要素の絶対位置を作る持っています

<div class="col-lg-12" style="**position:absolute**;z-index: 999; background: red; height: 40%;"> </div> 
関連する問題