[resolved] Image submit button (4 posts)

  1. armstrong1118
    Posted 8 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>
  2. armstrong1118
    Posted 8 years ago #

    is there anyone who can help?

  3. harknell
    Posted 8 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
    Posted 8 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


No tags yet.