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!
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/
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?
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?
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.
Look I'm sorry but I have to draw the line here.