How to make rollover button easily

Discussion in 'HTML & Website Design' started by guppyman, Aug 1, 2007.

  1. #1
    guppyman, Aug 1, 2007 IP
  2. Tarkan

    Tarkan Peon

    Messages:
    491
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well that doesnt have much code, why not just add some code on how to do it instead of showing them to a generator.

    Like <img src='....' onmouseover='this.src="..."' onmouseout=....
     
    Tarkan, Aug 1, 2007 IP
  3. Mooseman

    Mooseman Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Cool, but I prefer doing it with CSS though.
     
    Mooseman, Aug 1, 2007 IP
  4. eadkung

    eadkung Active Member

    Messages:
    148
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #4
    eadkung, Aug 1, 2007 IP
  5. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Paul O'Brien has a few examples you can learn from at www.pmob.co.uk (deathshadow even has a few on his site - PM him here on the forums for details; and no, Paul O'Brien is NOT deathshadow - they're two completely different people).
     
    Dan Schulz, Aug 1, 2007 IP
  6. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Wow, people still use javascript for roll over buttons?

    CSS is the way to go for a number of reasons - likewise the "text" on the button in most cases is much better off actually being text rather than part of the image.

    If you have 10 buttons on you site, with your system you then have 20 images to load. Using text and CSS to change the background image/ text colour etc you then have only 2 images to load.
     
    AstarothSolutions, Aug 2, 2007 IP