WordPress.org

Ready to get started?Download WordPress

Forums

Search bar: submit button and input field won't line up (2 posts)

  1. MuscatdeLunel
    Member
    Posted 2 years ago #

    Hello everyone,

    I am new to this forum. I installed the "YOKO" theme on my wordpress blog and wanted to "customize" the search bar button. I changed the border radius and color, but now for some reason the submit button and input field won't aline anymore: I get the input field in the first line and the line beneath contains the submit button.
    Here is what my CSS stylsheet looks like:

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    And this is what the function sections looks like:

    * Search form custom styling
     */
    function yoko_search_form( $form ) {
        $form = '<form role="search" method="get" class="searchform" action="'.get_bloginfo('url').'" >
        <div><label class="screen-reader-text" for="s">' . __('') . '</label>
        <input type="text" class="search-input" value="' . get_search_query() . '" name="s" id="s" />
       <input type="submit" class="searchsubmit" value="'. esc_attr__('Go!', 'yoko') .'" />
        </div>
        </form>';
        return $form;
    }
    add_filter( 'get_search_form', 'yoko_search_form' );

    What am I doing wrong? I have tried to google the topic but can't find any answers to my problem.
    If anyone could help me it would be very much appreciated!
    Thank you!

  2. Nelu
    Member
    Posted 1 year ago #

    I am having the same problem. Does anyone know the solution?

Topic Closed

This topic has been closed to new replies.

About this Topic