WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Image submit button (4 posts)

  1. armstrong1118
    Member
    Posted 6 years ago #

    Im trying to make the submit button for my search field an image, but its not showing the image, just the alt tag.

    Here's the code:

    <form method="get" id="searchform" action="<?php bloginfo('url'); ?>/">
    <div><input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /><p />
    <div id="ssubmit"><input type="image" src="images/searchimg.jpg" border="0" alt="Submit" id="searchsubmit" /></div>
    </div>
    </form>
  2. armstrong1118
    Member
    Posted 6 years ago #

    is there anyone who can help?

  3. harknell
    Member
    Posted 6 years ago #

    The most likely answer is that you aren't linking to the image file correctly. On some servers you may have to add a leading / to the relative link to get it to work. Also, as a "reality check" try using the absolute URL to link to the button (so use http://yoururl.com/images/searchimg.jpg). It is also possible the permissions on your image file or the folder it is in are incorrect (they should probably be 644 for the image and 755 for the folder) and are not letting the image be read properly.

  4. armstrong1118
    Member
    Posted 6 years ago #

    Thanks, when i used the absolute URL everything worked great.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.