Skip Navigation

[Resolved] Centering my Toolset search bar and submit button to be responsive

This support ticket is created 4 years, 10 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 8 replies, has 2 voices.

Last updated by Luo Yang 4 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1579267
Home_page.jpg

I am trying to center my Toolset search bar and submit button which uses Bootstrap to be responsive across all screen sizes. Please see the attached picture for how I want the search bar and the button to look on the home page. It should be centered on the page all the way down to tablet and mobile.

I could not find any documentation for this and I have tried many things. Currently, I am using @media queries to adjust settings to maintain my styling on my buttons and search bar.

Please see attached image.

Site is not currently live.

#1579411

Hello,

You can try Bootstrap CSS class "justify-content-center", see Bootstrap document:
hidden link

There is a demo in above document:

<div class="d-flex justify-content-center">...</div>
#1579473
Screen Shot 2020-04-09 at 2.31.27 AM.png
Screen Shot 2020-04-09 at 2.33.58 AM.png

Hi Luo,

Thank you for your quick response. I greatly appreciate it. The code you sent me did indeed work, however, after being centered, the styling of my search box disappeared as far as the width of the search box. Please see attached image for reference of how it appears after applying the code provided.

Also, attached is an image of the code used in Toolset for reference. Any ideas?

Thanks so much!

#1579491

It is a custom CSS problem, please provide the live problem page URL, I need to test it in my Chrome browser. Thanks

#1579493

Can I give you un/pw to log in as site is not currently live?

#1579495

Yes, I have enabled the private message box, please provide the credentials in it. Also point out the problem page URL and view URL, thanks

#1579559

I suggest you try to follow the Bootstrap document to display the form inputs:
hidden link

For example:

<div class="form-row d-flex justify-content-center">
<div class="input-group col-sm-3">
  [wpv-filter-search-box placeholder="Search for coliving communities..." output="bootstrap"]
  <div class="input-group-append">
   [wpv-filter-submit name="Search" type="button" output="bootstrap"]
  </div>
</div>
</div>
#1579593
Screen Shot 2020-04-09 at 3.55.07 AM.png
Screen Shot 2020-04-09 at 3.49.12 AM.png

Thanks so much Luo. It definitely did center and is responsive. However, I'm not sure how I can extend the width of the search box? I did it in the View by adding styling using html to the search box. This does extend the box, however, the button is wrapping and being placed underneath once width is extended.

#1579651

There isn't such kind of built-in feature within Toolset Views plugin, it needs custom CSS codes, I have searched it in google, and found this thread:
https://stackoverflow.com/questions/51257842/how-can-i-place-submit-button-inside-input-field-in-bootstrap#answers

For your reference.