1

有没有人有一个很好的解决方案来获得价格,它是一个垂直对齐左侧的变量?请不要桌子!

现在行的方式是这样显示的

input button $15.00 button
 input button $5.00 button

它应该看起来像这样

input button $15.00 button
input button $5.00  button

我尝试了 php 的 sprintf 或 str_pad 但它并没有真正做任何事情。

任何解决方案都是有帮助的。

从查看 php 页面来看,我的视野现在变得模糊

这是html

<div class="item-checkout">
                <!--checkout item-->
                <form class="fcheckoutform" id="<?php echo $id_checkoutform;?>" method="post" action="">
                    <div class="naam"><?php echo $naam;?></div>
                    <div class="fr al">
                        <input name="qty" rel="<?php echo $rel;?>" type="text" size="3" class="aantal"
                        value="<?php echo $aantal;?>" maxlength="4" id="<?php echo $id_aantal;?>">
                        <span class="btn">Toepassen</span>
                        <span class="price"><?php echo $price_lbl;?></span> 
                        <span class="verwijder">Remove</span>
                    </div>
                    <div class="cbt"></div>     
                </form>
            </div>

谢谢,理查德

4

1 回答 1

2

您可以只使用边距或填充吗?

input.naam{
padding-left: whatever_number_you_want px;
}
于 2012-06-25T20:17:10.683 回答