skip to Main Content

I placed the search bar in the header by adding the string in child Theme:

get_search_form ();

I wish the bar was shorter and aligned to the right.
I tried unsuccessfully to add the following to the stylesheet:

.search-form {
    max-width: 400px;
}

.search-form > label {
    width: 50%;

It does not work.
Can someone help me?

P.S. The page is this: https://www.carifiglimiei.com/

2

Answers


  1. ‘search-form’ css class is not present in your website page.
    Also

    get_search_form ();
    

    returns different structure than your current page html. I guess your search form is generated by any plugin.
    Or feel free to share the search form code.

    I used this function and found this code structure (manually added a wrapper class: search-form-wrapper)

    Login or Signup to reply.
  2. As someone said above. Your search form is generated by some plugin and has no class search-form. From what I can see you should use class gsc-search-box as for editing in CSS. I tried to use this class and It worked. Hope I helped you 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search