Php 使用zend decorator在zend表单中设置文本框后的图像
我正在使用zend form和zend decorator创建一个表单。我想在文本框后面设置一个图像。这样地: 我正在使用zend decorator,但它给我的感觉是: 我正在使用以下代码: 类CountryController扩展Zend_控制器_操作 { //=====================================为国家/地区添加操作============================ 公共函数addAction() { ))) } } 我正在使用IE6 生成的代码如下所示:Php 使用zend decorator在zend表单中设置文本框后的图像,php,zend-framework,zend-form,zend-decorators,Php,Zend Framework,Zend Form,Zend Decorators,我正在使用zend form和zend decorator创建一个表单。我想在文本框后面设置一个图像。这样地: 我正在使用zend decorator,但它给我的感觉是: 我正在使用以下代码: 类CountryController扩展Zend_控制器_操作 { //=====================================为国家/地区添加操作============================ 公共函数addAction() { ))) } } 我正在使用IE6 生成的代
<div class="container">
<form enctype="application/x-www-form-urlencoded" action="add"
method="post" Name="addfrm" Id="addfrm" name="">
<table align="center" class="tbcss" width="84%">
<tr valign="top" align="right">
<td id="cou_name-label"><label for="cou_name" class="required">Country
Name :</label></td>
> <td align="left"><img class="imgpos"> <input type="text"
> name="cou_name" id="cou_name" value="" class="textpos"
> validator="Alpha" />
> <td width="37%"></td>
> </img></td>
</tr>
<tr valign="top" align="right">
<td id="description-label"><label for="description"
class="required">Country Description :</label></td>
<td align="left"><img class="imgpos"> <textarea
name="description" id="description" rows="10" cols="40"
validator="NotEmpty" class="textpos"></textarea>
<td width="37%"></td>
</img></td>
</tr>
<tr valign="top" align="right">
<td id="block-label"><label for="block" class="optional">Block
:</label></td>
<td class="element" align="left" colspan="2"><input type="hidden"
name="block" value="0" /><input type="checkbox" name="block"
id="block" value="1" checked="checked" />
<td></td>
</td>
</tr>
<tr valign="top" align="right">
<td id="block_r-label"><label class="optional">Block :</label></td>
<td class="element" align="left" colspan="2"><label
for="block_r-0"><input type="radio" name="block_r"
id="block_r-0" value="0" />Yes</label><label for="block_r-1"><input
type="radio" name="block_r" id="block_r-1" value="1" />No</label>
<td></td>
</td>
</tr>
<div>
<td align="right"><input type="submit" name="add" id="add"
value="Add" /></td>
</div>
<div>
<td align="left">
<button name="back" id="back" type="button"
onclick=
window.location = "list";
Back</button>
</td>
</div>
</table>
</form>
</div>
国家
姓名:
>name=“cou\u name”id=“cou\u name”value=”“class=“textpos”
>validator=“Alpha”/>
>
>
国家说明:
块
:
区块:
是的
在css中只需添加
.imgpos {
float: right;
}
您也可以尝试左侧的float.textpos,但IE6不支持float。哦,没有注意到这一点。嗯,我不能测试它,但据我记忆所及,IE6支持浮动只是有双边距错误。
$this->view->assign('form',$form);
<div class="container">
<form enctype="application/x-www-form-urlencoded" action="add"
method="post" Name="addfrm" Id="addfrm" name="">
<table align="center" class="tbcss" width="84%">
<tr valign="top" align="right">
<td id="cou_name-label"><label for="cou_name" class="required">Country
Name :</label></td>
> <td align="left"><img class="imgpos"> <input type="text"
> name="cou_name" id="cou_name" value="" class="textpos"
> validator="Alpha" />
> <td width="37%"></td>
> </img></td>
</tr>
<tr valign="top" align="right">
<td id="description-label"><label for="description"
class="required">Country Description :</label></td>
<td align="left"><img class="imgpos"> <textarea
name="description" id="description" rows="10" cols="40"
validator="NotEmpty" class="textpos"></textarea>
<td width="37%"></td>
</img></td>
</tr>
<tr valign="top" align="right">
<td id="block-label"><label for="block" class="optional">Block
:</label></td>
<td class="element" align="left" colspan="2"><input type="hidden"
name="block" value="0" /><input type="checkbox" name="block"
id="block" value="1" checked="checked" />
<td></td>
</td>
</tr>
<tr valign="top" align="right">
<td id="block_r-label"><label class="optional">Block :</label></td>
<td class="element" align="left" colspan="2"><label
for="block_r-0"><input type="radio" name="block_r"
id="block_r-0" value="0" />Yes</label><label for="block_r-1"><input
type="radio" name="block_r" id="block_r-1" value="1" />No</label>
<td></td>
</td>
</tr>
<div>
<td align="right"><input type="submit" name="add" id="add"
value="Add" /></td>
</div>
<div>
<td align="left">
<button name="back" id="back" type="button"
onclick=
window.location = "list";
Back</button>
</td>
</div>
</table>
</form>
</div>
.imgpos {
float: right;
}