want to add an image to a html type input button

  • Thread starter Thread starter Valli
  • Start date Start date
V

Valli

Hi,

I want to add an image to a html type input button. How can I do this?
I have used background image style . But its not working.

My target is to show an image in the button
can anyone help me?
 
Hi,

I want to add an image to a html type input button. How can I do this?
I have used background image style . But its not working.

My target is to show an image in the button
can anyone help me?

Hi Valli

You're on the right track, you also need to set the background color
to transparent:
background-color: transparent;

Or you can do it all in one go:
background: transparent url(ButtonImage.gif) no-repeat center top;

Chris
 
Hi,

Thanks for your help. Using background color style, the image is getting
displayed in button now.
I am using this button in a html table cell. When user clicks on this
button, i will get the rowindex of the selected row.
If I use this style, the rowindex is not resulting properly.

Do you have any ideas on this?
 
Back
Top