SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mouseover effects on a submit button?

    Code:
    <input type='submit' value='submit!' />
    I tried using onFocus and onMouseOver to no avail...is it possible to change the background colour when mousing over then to revert back to the proper bg colour on mouse out? I'd prefer it to be this.className= too so I can define it all in my CSS file.

  2. #2
    SitePoint Enthusiast Big Joe's Avatar
    Join Date
    Jun 2003
    Location
    Ohio, U.S.A.
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put this in your css. Modify it to suit your preferences.

    input
    {
    background:#F00;
    color:#000;
    }

    input:hover
    {
    background:#000;
    color:#F00;
    }

  3. #3
    SitePoint Evangelist N9ne's Avatar
    Join Date
    Aug 2002
    Location
    England
    Posts
    581
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What would be the code to only apply the hover to a class I have set?

    Say that input has a class called 'submitbutton', would I use input.submitbutton:hover ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •