WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Theme: Twenty Twelve] custom search form (9 posts)

  1. LifeintheBush
    Member
    Posted 1 year ago #

    Hi,

    I've placed a search form in the header of my site, but I want a submit by hitting enter form and I'd like to add an image either into the search field or next to it but I'm not sure how to do it.

    The site is here...

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Your submit button works by hitting enter for me.
    Here's a similar query for the image http://stackoverflow.com/questions/917610/put-icon-inside-input-element-in-a-form

  3. LifeintheBush
    Member
    Posted 1 year ago #

    Is it possible to remove the button then?

    I'm not sure I get the stuff in that link either, but thanks.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are you using a Child Theme?

  5. LifeintheBush
    Member
    Posted 1 year ago #

    Yeah.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Is it possible to remove the button then?

    Yes.
    In your Child Theme stylesheet, add this;

    header #searchsubmit {
     display: none;
    }

    For your image in the search field, add this;

    header #searchform #s {
     /* Style taken from tutorial (linked in 1st post) */
     background: url(images/comment-author.gif) no-repeat scroll 7px 7px;
     padding-left: 30px;
    }

    Replace the path to your image (images/comment-author.gif) to your actual path.

  7. LifeintheBush
    Member
    Posted 1 year ago #

    Thank you

  8. Andrew
    Forum Moderator
    Posted 1 year ago #

    And Thank you for contributing to the WordPress community :)

  9. Manisha Sarangi
    Member
    Posted 11 months ago #

    hello LifeintheBush,
    I found your site and the search bar is just awesome and works very well.I am stucked in the search field.Can you guide me in how it works .I am using default twenty twelve theme..

Topic Closed

This topic has been closed to new replies.

About this Topic