Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make checkbox look like button

Tags:

css

asp.net

In my web app (c#/MVC3), I have a huge set of checkboxes in a table. Rather than a table of checkboxes, I'd like for it to look like a wall of toggle buttons. To the user I want it to look like a wall of buttons and when they click one it is 'checked' and the button changes color.

I wasn't sure if there was CSS that could make a checkbox do this (look like a button and change colors on check rather than show a check mark), or if I would have to use some combination of buttons and javascript/jquery and hidden checkboxes or what.

like image 556
Josh Blade Avatar asked Dec 29 '25 17:12

Josh Blade


1 Answers

The jQuery UI Button widget can handle that:

http://jqueryui.com/button/#checkbox

like image 175
James Curran Avatar answered Jan 03 '26 11:01

James Curran



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!