如何增加表格内复选框的大小?

时间:2011-07-28 19:35:15

标签: html css checkbox html-table resize

我正在尝试放大我放在桌子里面的复选框。 width:###px; height:###px;似乎只能减小尺寸。如果将它们设置为高于默认大小的任何值,则复选框将保持默认值,而div将达到我指定的大小。我试过将填充设置为零无效。

以下是我的表体代码示例:

%tbody
    -for foo in @foos
        %tr{:class=> cycle("even","odd")}
            %td{:style => "text-align:right;"}= foo.name
            -for bar in @bars
                %td
                    %input{:name =>"checkboxname", :type=> "checkbox", :checked => true, :style => "display:block;margin: 0 auto;width:20px;height:20px;padding:0px"}

2 个答案:

答案 0 :(得分:2)

这种跨浏览器并不是很好的方法。 This page显示了一些关于它的详细信息

答案 1 :(得分:2)

由于常规复选框无法自定义,因此您可能对使用其他方法感兴趣。

http://www.thecssninja.com/css/custom-inputs-using-css