Skip Navigation

[Resolved] center drop down filter

This support ticket is created 3 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by malagaS 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1706509

Tell us what you are trying to do? center drop down filter

Is there any documentation that you are following?

Is there a similar example that we can see? dev

What is the link to your site? i have a simple drop down filter in a view. it spans the length of the page. i can control the width with css but can't seem to center it. this is running in the divi theme, using a full width code module with the following in the code module:

<div>
[wpv-form-view name="display-listings-2" target_id="self" ]
</div>
<div >
[wpv-view name="display-listings-2" view_display="layout"]</div>

what i'd truly like to do is have each div in a column but gave up trying to achieve that. so any advice on either solutions, but the later being preferred, would be appreciated. thank you!

#1707241

Hello, what CSS have you tried so far? I might be able to take a look at this tomorrow and offer some guidance if there is time, but custom CSS is really outside the scope of support we provide here in the forums. What code have you tried so far? Where can I see the dropdown on the front-end of the site? Do I need a login? Private fields are activated here if you need to share one.

How to center something in CSS:
https://www.freecodecamp.org/news/how-to-center-things-with-style-in-css-dc87b7542689/
Fun educational tool:
https://css-tricks.com/centering-css-complete-guide/

#1707855
Screen Shot 2020-07-15 at 11.07.04 AM.png

I used an attribute selector with the name attribute, and it seems to be sufficiently specific to set left and right margins. Looks good with the automatic margin centering technique:

select[name="wpv-listings-category"] {
  margin-left:auto;
  margin-right:auto;
}

I didn't test the CSS in other browsers, but the attribute selector is well-supported: https://caniuse.com/#feat=mdn-css_selectors_attribute

Any problems with that when you implement it?

#1708157

that worked! thanks. now how do I get the submit button inline so it's at the end of the field, or if that's not possible, centered under the field.

it's not working at all in IE though. the whole layout created by blocks is not looking good in IE. will work on that but do you have any suggestion for the button css for IE?

#1708849

Look I'm sorry but I have to draw the line here. How would you do this in pure HTML without Toolset active? If you show me, I can show you how to adjust that code to work with Toolset, but that's not really your question. Your question is how to do this in pure HTML/CSS.

#1709447

Look I'm sorry but I have to draw the line here.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.