Richard
Richard

Reputation: 4546

getting text aligned by css or a php function to add space

does anyone have a nice solution to get de price wich is a variable aligned vertically to the left side? no tables please!

the way it is now lines are displayed like this

input button $15.00 button
 input button $5.00 button

and it should look like this

input button $15.00 button
input button $5.00  button

I try'd php's sprintf or str_pad but it does not really do anything.

Any solution is helpfull.

My vision is getting blurry now from looking at the php pages

this is the 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>

thanks, Richard

Upvotes: 1

Views: 106

Answers (1)

user721856
user721856

Reputation:

Can you just play with the margin or padding?

input.naam{
padding-left: whatever_number_you_want px;
}

Upvotes: 2

Related Questions