0

I use bootstrap-table and a column with checkboxes. How can I change size of checkboxes. In my code i want checkbox size 25x25, but when I use height and width css attributes it doesn't work.

html

<table class="table table-striped table-bordered table-hover"  cellspacing="0" id="mainTable" data-click-to-select="true" data-show-toggle="true" data-show-columns="true" data-search="true" data-pagination="true">
    <thead>
    <tr>
        <th data-field="state" data-checkbox="true" data-formatter="starsFormatter"></th>
        <th data-field="name" data-halign="center" data-align="left" data-sortable="true">Name</th>
        <th data-field="stargazers_count" data-formatter="starsFormatter" data-halign="center" data-align="left" data-sortable="true">Stars</th>
        <th data-field="forks_count" data-formatter="forksFormatter" data-halign="center" data-align="left" data-sortable="true">Forks</th>
        <th data-field="description" data-halign="center" data-align="left" data-sortable="true">Description</th>
    </tr>
    </thead>
</table>

javascript

var data = [{name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"},
           {name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"},
           {name: 'ala', stargazers_count: 234, forks_count: 234, description: "asdasdas"}]

$('table').bootstrapTable({
    data: data
});

function starsFormatter(row, value, inde) {
    return row + '<i class="glyphicon glyphicon-star"></i> ';
}

function forksFormatter(value) {
    return '<i class="glyphicon glyphicon-cutlery"></i> ' + value;
}

css

.bs-checkbox input{
    height: 25px;
    width: 25px;
}
Matt
  • 8,195
  • 31
  • 115
  • 225

2 Answers2

1

Simple and easy way to do it

input[type="checkbox"]{
transform:scale(x,y);
}

x,y can be any value depends upon how much large box you want

Code Black
  • 530
  • 5
  • 11
0
.bs-checkbox input
{
    zoom:2;
}
Matt
  • 8,195
  • 31
  • 115
  • 225