开发者

newbie css/php question - how to get a div between a label and an input with cakephp

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>
    <i开发者_高级运维nput 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 :)


You should use a <span> instead of a <div> so that you get an inline element.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜