• Resolved demented_circus_monkey

    (@demented_circus_monkey)


    I’m having issues getting my search css correct, and was hoping there was someone that could help me out with this.

    Right now my search button is going under my search box
    Image: https://i.imgur.com/cwrCPqY.jpg
    The Contact us is the last link in my menu, please ignore that.
    I would like to have it right next to the search box.

    First off I created a product-searchform.php under my theme folder with the following code.

    <?php
    
    $form = '<form role="search" method="get" id="searchform" action="' . esc_url( home_url( '/'  ) ) . '">
    	<div>
    		<label class="screen-reader-text" for="s">' . __( 'Search for:', 'woocommerce' ) . '</label>
    		<input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="' . __( 'Part Search', 'woocommerce' ) . '" />
    		<input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search', 'woocommerce' ) .'" />
    		<input type="hidden" name="post_type" value="product" />
    	</div>
    </form>';
    
    echo $form;

    Then in my style.css I have the following

    /*Searchbox*/
    #searchform
    {
                    width:150px;
                    margin:1px auto;
    }
    
    #searchsubmit
    {
                    width:75px;
                    margin:1px auto;
    }

    I’m unsure on what I’m doing wrong.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Search box CSS help needed’ is closed to new replies.