English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

At the moment I have a piece of script for a button:

onmouseover="style.backgroundColor='<%=background3%>';"

I to change this for a background image - I pressume I would need to use something like:

onmouseover="style.backgroundImage='url(image/button.gif)' ;"

but of course that does'nt work does anyone know what I need to do ?

Many Thanks

2007-12-16 05:24:50 · 2 answers · asked by mrajsmith2000 1 in Computers & Internet Programming & Design

Just to clarify onmouseover="style.backgroundColor='<%... works fine, surely if this start with style.background the image version can't just be background: url........ can it ?

2007-12-16 05:43:38 · update #1

2 answers

html button can't have a background image

you have to create the button using a TD element for example which has a background image style property

2007-12-16 05:30:57 · answer #1 · answered by mhnd_79 3 · 0 0

Hi

the correct code would be:

background:url('image.jpg');

replace image.jpg with the exact location of the picture.


Enjoy

Mike

..

2007-12-16 05:32:46 · answer #2 · answered by Sharing Best Practices! 3 · 0 0

fedest.com, questions and answers