Scrollable Checkbox/Radio Fields

Easy

CSS

Machine, BodyCommerce, Ajax Filter

Details

This CSS snippet enables you to make Radio or Checkbox filters scrollable. It is useful when there are a lot of options in a filter. It utilizes the “Limit Height of Radio/Checkbox filters” option in our filter plugin and transform it into a scrollable list. You need to enable it in the Filter Item you are trying to make scrollable and then add this CSS class to the Filter module:
de_scrollable_filter_options
.

Snippets Demo

Code

1

Description:
This code makes a radio/checkbox filter scrollable when "Limit Height of Radio/Checkbox filters" is enabled. The class "de_scrollable_filter_options" needs to be added to the Filter module for it to take effect.

Language: CSS

Where to add: Divi Theme Options

                        /* Make radio/checkbox filters scrollable */
/* Add the CSS class  "de_scrollable_filter_options" to the Filter 
module and enable "Limit Height of Radio/Checkbox filters" to the filter item you want to make scrollable. Don't forget to enter the height limit there */
.de_scrollable_filter_options .et_pb_de_mach_search_posts_item.limit_filters .limit_filter_text {
    display: none;
}

.de_scrollable_filter_options .et_pb_de_mach_search_posts_item.limit_filters .et_pb_contact_field_options_list.divi-filter-item.limit_filter_cont {
    overflow-y: auto;
}
                    

Related Snippets

Explore more from Divi Engine