cakephp – 如何水平排列单选按钮而不是垂直排列?

我一直在寻找 Cookbook – 7.3.3 Automagic Form Elements试图找到一种方式让单选按钮水平排列而不是垂直排列.我一直在看’div’=> ‘class_name’$options也是$options [‘between’],$options [‘separator’]和$options [‘after’]但是不成功.这样做有“蛋糕”方式吗?

<?=$form->input('Product Type',array(
     'type' => 'radio','id' => $tire['ProductType']['id'],'name' => $tire['ProductType']['id'],'options' => array(2=>'Tire Manufacturer',7=>'Rim Manufacturer '),));?>

相当于此

<label>Product Type</label>
<div style="padding-top:5px;">
    <input type="radio" name="data[Manufacturer][product_type_id]" value="<?=$tire['ProductType']['id']?>"> Tire Manufacturer &nbsp;&nbsp;
    <input type="radio" name="data[Manufacturer][product_type_id]" value="<?=$wheel['ProductType']['id']?>"> Rim Manufacturer
</div>

解决方法

最简单的方法是将每个单选按钮放在“LI”标签内,然后将CSS样式应用于“UL”,告诉它将水平而不是垂直显示“LI”标签.你可以找到很多水平列表设计 here.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...