2016-08-08 26 views
0
<form method="post" role="form" class="form-horizontal"> 
<div class="form-group"> 
    <div class="radio"> 
     <label class="control-label col-sm-2"> 
      <input type="radio" name="selectDate" id="date" style="margin-right: 0" checked>Date</label> 
     <div class="col-sm-3"> 
      <input type="text" class="form-control" id="startDate"> 
     </div> 
     <div style="float:left">:</div> 
     <div class="col-sm-3"> 
      <input type="text" class="form-control" id="endDate"> 
     </div> 
    </div> 
</div> 

引導三個單選按鈕打破了IE

我的單選按鈕顯示正常,鉻,邊緣,FF,但在舊版IE的破 - 按鈕和標籤不併攏。

enter image description here

我嘗試使用的jsfiddle但是當我使用IE瀏覽器的無線電不顯示。 plz幫助我。

https://jsfiddle.net/pLvop1ws/2/

回答

0

刪除「控制標籤」級和allign
工作代碼:

<form method="post" role="form" class="form-horizontal"> 
    <div class="form-group"> 
     <div class="radio"> 
      <label class="col-sm-2" style="padding-left:10%"> 
       <input type="radio" name="selectDate" id="date" style="margin-right: 0" checked>Date</label> 
      <div class="col-sm-3"> 
       <input type="text" class="form-control" id="startDate"> 
      </div> 
      <div style="float:left">:</div> 
      <div class="col-sm-3"> 
       <input type="text" class="form-control" id="endDate"> 
      </div> 
     </div> 
    </div> 
</form> 
0

不要使用複選框,單選按鈕form-group類。在這裏我再次寫了。請使用這個,並再次告訴我你的問題..

<form method="post" role="form" class="form-horizontal"> 
    <div class="radio"> 
     <label class="control-label col-sm-2"> 
      <input type="radio" name="selectDate" id="date" style="margin-right: 0" checked>Date</label> 

     <div class="form-group"> 
      <div class="col-sm-3"> 
      <input type="text" class="form-control" id="startDate"> 
      </div> 
      <div style="float:left">:</div> 
      <div class="col-sm-3"> 
      <input type="text" class="form-control" id="endDate"> 
      </div> 
     </div> 
    </div> 
</form> 
+0

THX對您有所幫助,但它不是工作,單選按鈕,只需移動到右豆蔻在IE中,鉻,FF仍然沒有問題 – dev520

+0

@ dev520什麼是您的IE版本? 8或9? – NoOneCare

+0

IE 9,窗口7 ... – dev520

0

好吧試試這個。我編輯

<form method="post" role="form" class="form-horizontal"> 
    <div class="radio"> 
    <div class="form-inline"> 
     <label> 
     <input type="radio" name="selectDate" id="date" style="margin-right: 0" checked>Date 
     </label> 

     <div class="form-group"> 
     <div class="col-sm-3"> 
      <input type="text" class="form-control" id="startDate"> 
     </div> 
     </div> 
     : 
     <div class="form-group"> 
     <div class="col-sm-3"> 
      <input type="text" class="form-control" id="endDate"> 
     </div> 
     </div> 
    </div> 
    </div> 
</form> 
+0

@ dev520我刪除了你的單選按鈕標籤'col-sm-2'並添加了'form-inline'類。你不需要使用這個冒號':'分隔。 – NoOneCare

+0

哦,它工作,但我需要col-sm-2來支持我,我該怎麼做 – dev520

+0

@ dev520好,那麼你必須在'form-inline'類之前加入'col-sm-2' div類別忘了投給我) – NoOneCare