Results 1 to 8 of 8

Thread: Form Buttons Hover

  1. #1
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default Form Buttons Hover

    How do you change the color of the form button on the hover, i know how to do it on the static *when the mouse is not on it*

    its CSS. here is what i have in the head (its all related to the button)
    HTML Code:
    <style type="text/css">
    /*IBW DESIGN */
    /*MUST STAY IN CONTACT FOR USE! */
    .menu{
    	background-color: #777777;
    	color: 000000;
    	font-family: Tahoma;
    	font-size: 14px;
    	width: 300px;
    }
    .menu input{
    	background-color: #888888;
    	border: 0px;
    	color: 000000;
    	font-family: Tahoma;
    	font-size: 14px;
    }
    .menu input:mouseover{
    	background-color: #000000;
    	border: 0px;
    	color: 000000;
    	font-family: Tahoma;
    	font-size: 14px;
    }
    </style>

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Not 100&#37; sure on this, but shouldn't this part (the one in red):

    Code:
    .menu input:mouseover{
    	background-color: #000000;
    	border: 0px;
    	color: 000000;
    	font-family: Tahoma;
    	font-size: 14px;
    }
    be set as "hover" (without the quotes)?
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That's right, thetestingsite:

    Code:
    .menu input:hover {
    	background-color: #000000;
    	border: 0px;
    	color: #000000;
    	font-family: Tahoma;
    	font-size: 14px;
    }
    And just to be safe, add the space before the brace as shown. However, this will not work for IE 6 and earlier. But, you can use javascript onmouseover and onmouseout events for those browsers if you like, or just not worry about them as, they are being phased out.

    One more thing, with both the color and background-color #000000, the text (if any) will 'disappear' onmouseover.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Jan 2007
    Location
    The stage
    Posts
    568
    Thanks
    23
    Thanked 6 Times in 6 Posts

    Default

    Thanks, I knew the text would dissapear, it was just in the testing stage.


    BTW For some reason it doesn't work in IE 7, But it works in Fire Fox, Microsoft jeese, they can't do anything right, except for making computers,
    Last edited by Rockonmetal; 03-28-2007 at 05:34 PM.

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    In IE, the hover class does not work. The only alternative for this is javascript.
    - Mike

  6. #6
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Microsoft doesn't sell any actual hardware.
    Just under-par software.

    but IE is a pain in the neck for most people who make web pages, ive tried to make up for it on my site (here), but for some reason hr elements are styled differently in ie then gecko/khtml browsers.
    also the fact that it refuses to be postitioned/given colored borders/margins...

    i should try an empty div <div /> and see if it works the same...

    Edit: Not even close...
    Last edited by boxxertrumps; 03-28-2007 at 06:19 PM.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    It should work in IE 7, this does:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    input:hover {
    color:red;
    background-color:black;
    }
    </style>
    </head>
    <body>
    <input type="button" value="hi">
    </body>
    </html>
    But! The DOCTYPE is required!!
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Mar 2007
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yeah running the webpage in quirks mode is not an option for stuff like this.

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
  •