WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Replace Image (5 posts)

  1. corefx
    Member
    Posted 8 years ago #

    I want to put an image in the 'search' input field. How would I go about doing this, I've looked around but didn't see anything and thought one of you might have already done this.

  2. jalenack
    Member
    Posted 8 years ago #

    css:

    input#search-box {
    background: url(myimage.png);
    }

    where search-box is the id of the box you want to change.

  3. corefx
    Member
    Posted 8 years ago #

    so does the input type change or no? I.e. is it type="image" or type="submit"

  4. jalenack
    Member
    Posted 8 years ago #

    Aah, I see what you're getting at. You can use both. If you use type="submit", you'll need to use the css I mentioned above. If you use type="image", you'll need to add an src="myimage.jpg" Both do the same thing, but be sure to test in different browsers, because support for form-button styling is a little shoddy. I'd probably go with type="image" if I were you.

    This page may help: http://htmldog.com/guides/htmlbeginner/forms/

  5. corefx
    Member
    Posted 8 years ago #

    yeah i should of clarified, the question should have been use type="image" or type="submit" but thanks for the help

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.