0

I am preparing to allow users to edit specific fields of content. I have until now used autocomplete for myself.

I would like to start using the Check boxes, but as of right now it show my 30 terms as a one column list.

Is there a way to have these terms show in 4 columns instead of one long column. (to organize it better and utilize page space)

3
  • Use CSS to change the layout of that field Jun 14, 2014 at 1:49
  • How do i use CSS To make one column turn into 3 or 4 i think that is HTML
    – Anon Ymous
    Jun 15, 2014 at 19:17
  • Did the answer below help? Jun 17, 2014 at 1:08

1 Answer 1

1

If you are familiar with using CSS to change the layout of your drupal site already, something like this should work:

/* Make categories field 2 columns */

div.form-item.form-type-checkboxes.form-item-field-categories-und {

    -moz-column-count: 2;
    -moz-column-gap: 20px;
    -webkit-column-count: 2;
    -webkit-column-gap: 20px;
    column-count: 2;
    column-gap: 20px;

}

If not, it will depend on what theme you are using. We are using the seven theme for our admin pages, which include the node create pages. In the seven theme, I could just add the chunk of CSS above to the style.css file. Technically however, this chunk probably shouldn't be added into a core theme because it might get wiped out when/if you upgrade drupal core.

If you want to do it properly, you should create a new stylesheet with something similar to the CSS chunk above and give it a name. Then, add that stylesheet in your theme's .info file. (You can see specific instructions on how to do that here: https://drupal.org/node/171209)

Be sure that you don't have your CSS optimized when you are updating your stylesheets. If you aren't sure how to check this setting, go to admin/config/development/performance and make sure the option to aggregate and compress CSS isn't checked.

Without knowing more about your setup, what theme you are using, etc. it's hard to make a more specific recommendation.

1
  • Thanks! just what i needed. I never new i could do columns with CSS. All is good. =-)
    – Anon Ymous
    Jun 17, 2014 at 4:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.