Skip Navigation

[Resolved] Display checkboxes horizontally

This thread is resolved. Here is a description of the problem and solution.

Problem:

Display checkboxes in custom search form horizontally.

Solution:

It needs custom CSS codes, for example:

https://toolset.com/forums/topic/display-checkboxes-horizontally/#post-1176707

Relevant Documentation:

https://toolset.com/documentation/user-guides/adding-custom-css-views/

This support ticket is created 5 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by Sia 5 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1176346

Sia

Tell us what you are trying to do?
-- Display checkboxes horizontally

Is there a similar example that we can see?
-- I tried using the code found in https://toolset.com/forums/topic/horizontal-checkboxes/
Placed it in the CSS Editor under Search and Pagination, but it's not doing anything.
What should I do? Thank you!

[wpv-filter-start hide="false"]
[wpv-filter-controls]

<span class="ggg">
<div class="form-group">
<label>[wpml-string context="wpv-views"]<h3>Example Tags</h3>[/wpml-string]</label>
[wpv-control-post-taxonomy taxonomy="example-tag" type="checkboxes" url_param="wpv-example-tag"]
</div>
</span>

[/wpv-filter-controls]
[wpv-filter-end]

ul.wpt-form-set-checkboxes li {
float: left;
margin-right: 15px;
list-style: none;
}

#1176707

Hello,

The CSS codes you mentioned above is outdated, I suggest you try these:
1) Edit the codes in "Search and Pagination", add a custom CSS class name in it, for example:
From:

<div class="form-group">
...

To:

<div class="form-group horizontal-checkboxes">
...

Then use below CSS codes:

.horizontal-checkboxes div.checkbox {
display: inline-block;
}

And test again.

More help:
https://toolset.com/documentation/user-guides/adding-custom-css-views/

#1176995

Sia

My issue is resolved now. Thank you!