Reputation: 119
I'm using cakephp. I have a form where one of the inputs is there for users to enter a money amount into. I'm trying to get a £ symbol to appear in a div beside the form input which would both be below the form label. In otherwords I want the label to be on one line, then beneath that a div with the £ in it and beside, on the same line, the input.
I use this to make the input
echo $form->input('Campaign.target',
array('label'=>'I want to raise',
'between'=>'<div id="currencySymbol">£</div>'));
and it outputs:
<div class="input text required">
<label for="CampaignTarget">I want to raise</label>
<div id="currencySymbol">£</div>
<input name="data[Campaign][target]" type="text" maxlength="11" id="CampaignTarget" />
</div>
I've tried floating things, inlines blaa blaa etc but I'm a bit of a newb with css and in a hurry. Can anyone set me straight?
Cheers :)
Upvotes: 0
Views: 99
Reputation: 887215
You should use a <span>
instead of a <div>
so that you get an inline element.
Upvotes: 2