Mouseover effect on button - HELP!

Discussion in 'HTML & Website Design' started by drhfinegifts, Nov 12, 2006.

  1. #1
    I used an online button generator to create buttons with mouseover effect. I already saved the images and did ftp to my website.

    However, I don't quite understand the html code generated by the program:

    <img ID=button92 src=button508640.jpg width=90 height=40
    onmouseover='document.getElementById("button92").src="/images/button508640on.jpg"'
    onmouseout='document.getElementById("button92").src="/images/button508640.jpg"'>

    Now, I would think you would create an item in your CSS file for the mouseover & mouseout effects.

    I'm just not quite understanding the elements of this code and how to hardcode both the code for the template and for CSS, if needed.

    Anyone have a clue? Or is there something I need to tweak with these tags?

    Help would be GREATLY appreciated!
     
    drhfinegifts, Nov 12, 2006 IP
  2. KC TAN

    KC TAN Well-Known Member

    Messages:
    4,792
    Likes Received:
    353
    Best Answers:
    0
    Trophy Points:
    155
    #2
    I don't think your codes would require CSS to run.. However, you can check out the hover Pseudo-classes if you want to use this CSS version of mouseover.

    Hope that I answer your question :rolleyes:
     
    KC TAN, Nov 13, 2006 IP
  3. dp-user-1

    dp-user-1 Well-Known Member

    Messages:
    794
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Use JavaScript, but preload the images.
     
    dp-user-1, Nov 13, 2006 IP