Support » Fixing WordPress » Edit position of search button / field

  • Resolved zaqedc

    (@zaqedc)


    I’ve got a header that is basically just a row of images. On the right hand side I want to put the default wordpress search box. I called get_search_form() and this put it in the header but underneath the row of images. Put the following in the style.css to solve that:

    .searchfield{
    	float: right;
    	margin-top:-38px;
    	margin-left:15px;
    	}

    However, although this puts the text field in the same line/row as the images the search button remains in the exact same place, underneath that row of images.

    I couldn’t find anything in the css file that shows attributes for a search button. Checking the searchform.php I noted the id “searchsubmit” assigned to the button, so I put the following into the css file, underneath the .searchfield part, hoping it would work:

    .searchsubmit{
    	float: right;
    	margin-top:-38px;
    	margin-left:15px;
    	}

    The header remains the exact same: The row of images displays, the search text field next to them and, below that row, the lone search button.

    If anyone has an idea of how to solve this I’d be really grateful, because I’m stumped!

Viewing 2 replies - 1 through 2 (of 2 total)
  • zaqedc

    (@zaqedc)

    Found a section called input#s, which looks like it may control the button’s positioning. I’ve tried the following attributes in varying combinations:

    float: right;
    margin-top:-38px;
    margin-right:30px;

    No success.

    zaqedc

    (@zaqedc)

    Resolved. I mistakenly used a dot (.) instead of the hash symbol (#) in front of the searchsubmit section I had added to the css file. Looks like this and works correctly now:

    #searchsubmit{
    	float: right;
    	margin-top:-38px;
    	margin-left:15px;
    	}
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit position of search button / field’ is closed to new replies.