Forums

[resolved] Using an image on the comment submit button (4 posts)

  1. boothdv
    Member
    Posted 2 years ago #

    Hello,

    I am trying to use an image as the submit button on my comment form and can't seem to get it to sort out. I read the Codex and didn't have any luck so I did it "old school" style by using type="image":

    <input name="submit" type="image" src="http://www.domain.com/wp-content/themes/nightvision11/images/c_btn.gif" id="submit" tabindex="5" class="csub" value="Submit Comment" />

    This works and the image displays as the button but now there is a border around the button (Firefox) and I can't seem to figure out how to get rid of it.

    If someone could lend me a hand with resolving this and getting rid of the border or if there is a better way to use the image as the button using CSS, I would greatly appreciate it.

    Thanks,

    Dave

  2. Justin01
    Member
    Posted 2 years ago #

    Website's address please.

    Or go look on W3C's website, if I remember correctly, you can disable the border with some property.

  3. Hax
    Member
    Posted 2 years ago #

    in your styles.css add the following style to remove the border

    input.csub { border:none 0px}

    or if you want to use an alternative to use the image as button try using a regular type="submit" with the classs csub and the style(css):

    input.csub {
      background:#FFF url(URLTOYOURIMAGE) no-repeat 50% 50%;
      border:none 0px
     }

    I didn't actully test it but it should work

  4. boothdv
    Member
    Posted 2 years ago #

    or if you want to use an alternative to use the image as button try using a regular type="submit" with the classs csub and the style(css):

    input.csub {
    background:#FFF url(URLTOYOURIMAGE) no-repeat 50% 50%;
    border:none 0px
    }

    Thanks Hax, that worked!

Topic Closed

This topic has been closed to new replies.

About this Topic