我怎么能对齐插件盒bootstrap - html

时间:2015-09-15 02:27:15

标签: html css twitter-bootstrap

我的问题是我的" OCD"杀了我:

https://jsfiddle.net/3esrpdLt/1/

<table style="width:100%;">
<tr>
    <td class="quoteprice">
        <div class="form-group">
            <label>Subtotal: &nbsp;</label>
        </div>
    </td>
    <td>
        <div class="input-group">
            <div class="input-group-addon currency">$</div>
            <input value="<?php echo isset($invoice['data']['subTotal']) ? $invoice['data']['subTotal']: ''; ?>" type="number" class="form-control" name="data[subTotal]" id="subTotal" placeholder="Subtotal" onkeypress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;">
        </div>
    </td>
</tr>
<tr>
    <td class="quoteprice">
        <div class="form-group">
            <label>ITBIS: &nbsp;</label>
        </div>
    </td>
    <td>
        <div class="input-group">
            <div class="input-group-addon currency">$</div>
            <input value="<?php echo isset($invoice['data']['subTotal']) ? $invoice['data']['subTotal']: ''; ?>" type="number" class="form-control" name="data[subTotal]" id="subTotal" placeholder="Subtotal" onkeypress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;">
        </div>
    </td>
</tr>
<tr>
    <td class="quoteprice">
        <div class="form-group">
            <label>Descuento: &nbsp;</label>
        </div>
    </td>
    <td>
        <div class="input-group">
            <div class="input-group-addon currency">%</div>
            <input value="<?php echo isset($invoice['data']['subTotal']) ? $invoice['data']['subTotal']: ''; ?>" type="number" class="form-control" name="data[subTotal]" id="subTotal" placeholder="Subtotal" onkeypress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;">
        </div>
    </td>
</tr>
<tr>
    <td class="quoteprice">
        <div class="form-group">
            <label>Total: &nbsp;</label>
        </div>
    </td>
    <td>
        <div class="input-group">
            <div class="input-group-addon currency">$</div>
            <input value="<?php echo isset($invoice['data']['subTotal']) ? $invoice['data']['subTotal']: ''; ?>" type="number" class="form-control" name="data[subTotal]" id="subTotal" placeholder="Subtotal" onkeypress="return IsNumeric(event);" ondrop="return false;" onpaste="return false;">
        </div>
    </td>
</tr>

正如你在jsfiddle上看到的那样,当我使用&#39;%&#39;图标它比其他部分大一点,有没有办法可以防止这种情况发生?

1 个答案:

答案 0 :(得分:0)

如果你想让它们更大,可以将它添加到你的CSS中:

.input-group-addon {
    min-width: 40px;
}

或者,如果您希望%减少,请使用:

.input-group-addon {
    max-width: 33px;
}

this你想要的是什么吗?