Support » Fixing WordPress » Search button to image

  • I know how to do this in 1.2 thanks to Podz’s tutorial. However, the sarch code is different for 1.5

    Could anyone post a solution on how to convert the search button to an image on 1.5 in particular to this piece of code?

    <form style=”padding: 0px; margin-top: 0px; margin-bottom: 0px;” id=”searchform” method=”get” action=”<?php bloginfo(‘url’); ?>”>
    <div class=”sidebartitle”>Search</div>
    <p style=”padding: 0px; margin-top: 0px; margin-bottom: 0px;”><input type=”text” class=”input” name=”s” id=”search” size=”15″ />
    <input name=”submit” type=”submit” tabindex=”5″ value=”<?php _e(‘GO’); ?>” />

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mark (podz)


    Support Maven

    I just tried this on my site:
    <form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>">
    <input type="text" alt="search" name="s" id="s" size="15" />
    <input type="image" src="" name="search" alt="Search" class="button" />

    and it seems to work.

    I do not have a .button{} class in my css.
    If it doesn’t work, post back and we’ll figure it out 🙂

    Actually, it worked well. All I had to do really in order to keep the format of the search bar was replace this line:

    ‘<input name=”submit” type=”submit” tabindex=”5″ value=”<?php _e(‘GO’); ?>” />’

    with this line:

    ‘<input type=”image” src=”” name=”search” alt=”Search” class=”button” />’

    Thanks, Podz!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search button to image’ is closed to new replies.