Title: Search button margin problem
Last modified: January 2, 2023

---

# Search button margin problem

 *  Resolved [turbobo](https://wordpress.org/support/users/turbobo/)
 * (@turbobo)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/)
 * Hi!
   For some reason, there is a small empty space above the search button in 
   the search bar in the menu bar, how can it be removed? I tried this, but this
   way the second search bar below slides up.
 * .woocommerce button[type=submit]:not(.wp-block-search__button) {margin-top: 0}
 * And the bottom search bar button looks pretty weird for some reason.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Kris](https://wordpress.org/support/users/c0nst/)
 * (@c0nst)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/#post-16337550)
 * Hi [@turbobo](https://wordpress.org/support/users/turbobo/)
 * Your code should be working, but to make sure you can use `! important`.
 *     ```wp-block-code
       .woocommerce button[type=submit]:not(.wp-block-search__button) {
       	margin-top: 0 !important;
       }
       ```
   
 * Paste it into Appearance -> Customize -> Additional CSS. If you aren’t familiar
   with custom CSS, take a look at [this video](https://www.youtube.com/watch?v=f0_6aeZEV58).
   
   Regards,Kris
 *  Thread Starter [turbobo](https://wordpress.org/support/users/turbobo/)
 * (@turbobo)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/#post-16337717)
 * Thanks for your help. The code works, but there is another search bar below and
   it will be wrong. Here is the website, maybe this way you can see the problem
   better: [https://www.boltway.hu/](https://www.boltway.hu/)
 *  [Kris](https://wordpress.org/support/users/c0nst/)
 * (@c0nst)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/#post-16338044)
 * Hi [@turbobo](https://wordpress.org/support/users/turbobo/)
 * To fix the 2nd search bar use this code:
 *     ```wp-block-code
       .woocommerce button[type=submit]:not(.wp-block-search__button) {
       	margin-top: 0 !important;
       	min-height: 40px !important;
       }
   
       .dgwt-wcas-search-wrapp p {
       	margin: 0;
       }
       ```
   
 * Paste it into Appearance -> Customize -> Additional CSS.
   Regards,Kris
 *  Thread Starter [turbobo](https://wordpress.org/support/users/turbobo/)
 * (@turbobo)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/#post-16338714)
 * Worked. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Search button margin problem’ is closed to new replies.

 * ![](https://ps.w.org/ajax-search-for-woocommerce/assets/icon-256x256.png?rev=
   2883754)
 * [FiboSearch - Ajax Search for WooCommerce](https://wordpress.org/plugins/ajax-search-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-search-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-search-for-woocommerce/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [turbobo](https://wordpress.org/support/users/turbobo/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/search-button-margin-problem/#post-16338714)
 * Status: resolved