function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Enlarge Checkboxes???

Hello.  Does anyone know whether a checkbox (via an inputField or selectCheckboxes) can be enlarged?  I know there are some CSS solutions...but nothing seems to work from within visualforce.


Thanks in advance.


I hope I'm not giving bad advice, but as far as I could find, styling checkboxes is not a prebuilt visualforce feature. So you would have to either style it using a pure css solution or a javascript and css solution. My experience with the pure css solutions and checkboxes is that you only have decent control styling checkboxes in webkit browsers. Personally, it still wasn't enough control (cross-browser) for me to implement it. Here's a css selector:






I've seen someone use jQuery UI to address this issue cross-browser.



Thanks.  I think VF intentionally makes it hard to style a checkbox.


Nah; really they didn't. Powerful styling of most form related elements has always been a challenge with traditional HTML and CSS.


In my opinion, the thing that makes styling in VF difficult is the default <apex:page standardStylesheets="true"... This colection of css is expected for frameworks that automate so much for clients. Overriding these styles cross-browser is extremely time-consuming and unfortunately, setting it to false can remove functionality.