2015-10-20 20 views
0

。它應該爲這方面的工作:無論我嘗試,我無法獲得在輸入​​字段下的邊界在一定的值下的輸入字段下的邊界與Bootstrap 3和Rails 4

input { 
    margin-bottom: 5px; 
} 

而且它適用於50px例如但我不能低於一定的餘量。也嘗試過與!important但這並沒有幫助。

這些樣式正在應用。不幸的是,禁用它們並不會改變頁邊距。

*::before, *::after { 
    box-sizing: border-box; 
} 
*::before, *::after { 
    box-sizing: border-box; 
} 
.form-control { 
    background-color: #fff; 
    background-image: none; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset; 
    color: #555555; 
    display: block; 
    font-size: 14px; 
    height: 34px; 
    line-height: 1.42857; 
    padding: 6px 12px; 
    transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s; 
    width: 100%; 
} 
input { 
    margin-bottom: 5px; 
} 
input, button, select, textarea { 
    font-family: inherit; 
    font-size: inherit; 
    line-height: inherit; 
} 
input { 
    line-height: normal; 
} 
button, input, optgroup, select, textarea { 
    color: inherit; 
    font: inherit; 
    margin: 0; 
} 
* { 
    box-sizing: border-box; 
} 
.form-control::-moz-placeholder { 
    color: #999; 
    opacity: 1; 
} 
body { 
    color: #333333; 
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; 
    font-size: 14px; 
    line-height: 1.42857; 
} 
html { 
    font-size: 10px; 
} 
html { 
    font-family: sans-serif; 
} 

的HTML:

<div class="row"> 
    <div class="col-md-4"> 
    <div class="form-group string optional house_name"> 
    <label class="string optional control-label" for="house_name">Name</label> 
    <input id="house_name" class="string optional form-control" type="text" value="new house" name="house[name]"> 
    </div> 
    </div> 
    <div class="col-md-4"> 
    <div class="form-group select optional house_region"> 
     <label class="select optional control-label" for="house_region_id">Region</label> 
     <select id="house_region_id" class="select optional form-control" name="house[region_id]"> 
     <option value="">Wähle eine Region</option> 
     <option value="1">Provence-Alpes-Côte d’Azur in Frankreich</option> 
     <option value="2">Midi-Pyrenäen in Frankreich</option> 
     <option value="3">Lombardei in Italien</option> 
     <option value="4">Andalusien in Spanien</option> 
     </select> 
    </div> 
    </div> 
    <div class="col-md-4"> 
    <div class="form-group string optional house_htype"> 
     <label class="string optional control-label" for="house_htype">Typ</label> 
     <input id="house_htype" class="string optional form-control" type="text" placeholder="Typ" name="house[htype]"> 
    </div> 
    </div> 
</div> 
+0

我沒有在所有樣式中看到單一樣式 - 'input {margin-bottom:5px}'? – Vucko

+0

哦,是啊,我的這個CSS是來自我的select_field。我現在就改變它。 – Syk

+0

你也可以發佈你的標記嗎? – Vucko

回答

0

不能你把一個div周圍的輸入,並給了保證金?

+0

試過了。雖然沒有改變任何東西。我只是意識到我的自舉水龍頭有同樣的問題。也看起來像保證金是一樣的。 – Syk