开发者

How can I increase the size of a checkbox inside of a table?

开发者 https://www.devze.com 2023-03-23 20:29 出处:网络
I\'m trying to enlarge the checkboxes I\'ve placed inside of a table.width:###px; height:###px; only seem capable of decreasing the size.If they are set to anything higher than the default size, the c

I'm trying to enlarge the checkboxes I've placed inside of a table. width:###px; height:###px; only seem capable of decreasing the size. If they are set to anything higher than the default size, the checkboxes simply remain default while the div gets as large as I specified. I have tried setting padding to zero to no avail.

Here is an example of my table body code:

%tbody
    -for foo in @foos
        %tr{:class=> cycle("even","odd")}
            %td{:style => "text-align:right;"}= foo.name
            -for bar in @bars
                %td
                    %input{:name =>"checkboxna开发者_运维知识库me", :type=> "checkbox", :checked => true, :style => "display:block;margin: 0 auto;width:20px;height:20px;padding:0px"}


Since the regular checkboxes aren't really customizable, you might be interested in using a different approach.

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


There's not really a great way to do this cross-browser. This page shows some good details about it

0

精彩评论

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