Forums › Forums › Search & Filter Pro › Dropdown Field Spacing Question
- This topic has 8 replies, 2 voices, and was last updated 7 years, 4 months ago by Anonymous.
-
Anonymous(Private) July 15, 2017 at 10:54 pm #120798
Hi,
How do I reduce the spacing between the the headings of my dropdowns and my dropdown fields? Also, how do I reduce the spacing between dropdown fields? The S&F form is used via a shortcode for one page and via woocommerce shop on another. Thanks and your help is greatly appreciated.Ron
Trevor(Private) July 17, 2017 at 7:54 am #120889OK, the gap between them is mainly made with two elements that I can see when using the browser inspector. On the heading there is some bottom padding, and in the dropdown select some top margin. The CSS that sets these looks like this respectively:
.searchandfilter h4 { padding: 5px 0 10px; }
(the 10px is the bottom setting) and
.widget select { margin-top: 13px; }
And to respectively reset these:
.widget .searchandfilter h4 { padding-bottom: 1px; }
and
.widget .searchandfilter select { margin-top: 1px; }
You can change the values as you need or set them to
0
(no units needed for 0 values). If the gap between the dropdown select and the next field title is too great, then you can add padding-top and margin-bottom respectively to those two snippets.It is hard to be precise, as your CSS is combined and minified for performance (making developing harder).
Anonymous(Private) July 17, 2017 at 1:54 pm #120973Thanks Trevor!
However the change you recommended didn’t work. Before reaching out to you I tried:
.searchandfilter ul li {
padding-top: 5px;
padding-bottom: 5px;
}And that reduced the spacing between the first header titled ‘sort results by’ and the search bar above it. However I’m not sure how to create the same results for the drop downs and headers below that first one.
I thought your code above would work but it didn’t. Do you have any other suggestions?
Trevor(Private) July 18, 2017 at 7:22 am #121176Most odd. When I view the page in the Inspector in Firefox, they are not there (the
<p>
‘s or<br>
‘s). When I look at the page source code, they are not there either. That means that your browser must be adding them? Did you try another browser on your computer?I suppose that you could give them some custom CSS, like this:
.searchandfilter label br { height: 0; line-height: 0; }
or maybe
.searchandfilter label br {display: none;}
Anonymous(Private) July 18, 2017 at 11:52 am #121242Thanks Trevor!
The main piece that cleaned up the formatting was:
.searchandfilter label br {display: none;}
Then I also used the following like you recommended to clean up some additional formatting:
.searchandfilter ul li { padding-top: 1px; padding-bottom: 1px; } .widget li { line-height:10px; } .searchandfilter p { margin-top: 1px; margin-bottom: 1px; } .widget select { margin-top: 1px; margin-bottom: 1px; }
I appreciate all the help!
-
AuthorPosts