In
this post
, Hung suggests adding the following to custom.css to support multi-column checkboxes -
.validate-custom-checkbox{
-moz-column-count:2; /* Firefox */
-webkit-column-count:2; /* Safari and Chrome */
column-count:2;
}
The problem is that class doesn't appear in the generated html.
.validate-custom-radio appears for radio buttons and is customizable
Hi, David.
It was for older version of JomSocial... hung post is 9 months old (!).
probably class just changed.
Please, make a printscreen what and where you want to change.
Or use FireBug to get class name.
I discovered the class is correct, problem is it only shows if the field is required, in which case it's class="checkbox required validate-custom-checkbox"
If it's not required then it's class="checkbox " and setting .checkbox in custom css seems to make no difference.
For now I can just make the field required but I'm not sure why .checkbox doesn't work
Hi, David.
.checbox class is assigned to input. Trying to display it in two columns has no use.
If you want to have checkboxes in two columns you need to assign proper styling to parent div but within form .form-field:
prntscr.com/4jj8hi
Thanks for the reply, sorry for the late response!
If I understand it appears this can't be styles through custom CSS and needs hacking of the core jomsocial files and thus will be overwritten with updates?
/david
Hi, David.
No, It can be - just look on the printscreen. You just need to apply it to proper element.
Try to use FireBug or Chrome dev tools to play with it and see what elemnt you need to style.
Just like on printscreen.
Ok, I'm not getting it. The element you applied it to is a div, with no associated id or class. How do I style it without editing one of the layout files?
Hi, David.
Container doesn't need a class to select it :) You can select it in various ways e.g:
.form-field div {
-webkit-column-count: 2;
}.form-field > div {
-webkit-column-count: 2;
}.form-field div:first-of-type {
-webkit-column-count: 2;
}.form-field div:last-of-type {
-webkit-column-count: 2;
}.form-field div:nth-child(2) {
-webkit-column-count: 2;
}