SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,563
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript and FireFox :: Submit button style problem !!!

    Hi guys

    I'm using something like this:
    PHP Code:
    .submit.submit 
     
    font-familyVerdanaArialHelveticasans-serif
     
    font-size9px
     
    font-weightbold;
     
    background-color#5B9799; 
     
    color#D8DDDE; 
    }

    .
    submit.out 
     
    font-familyVerdanaArialHelveticasans-serif
     
    font-size9px
     
    font-weightbold;
     
    background-color#F5D799; 
     
    color#252117; 

    in an externel style sheet and then calling them later as:
    PHP Code:
    <input type="submit" value="Send" name="submit" class="submit" onMouseOut="this.className='submit'" onMouseOver="this.className='out'" /> 
    This is giving a style to my input button and then changing it onMouseOver. Problem is that though it is working well in IE, it is not working in FF. OnMouseOver, the background is turning gray and text black.

    Can anybody help ?
    Thanks

  2. #2
    SitePoint Member
    Join Date
    Apr 2005
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    your css declaration are not correct. This is not a javascript question.
    Code:
    <style>
      .submitout {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    font-weight: bold;
    background-color: #5B9799;
    color: #D8DDDE;
    }
    
    .submitover {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 9px;
    font-weight: bold;
    background-color: #F5D799;
    color: #252117; }
    
    </style>
    Code:
    <input type="submit" value="Send" name="submit" 
    class="submitout" 
    onMouseOut="this.className='submitout'" 
    onMouseOver="this.className='submitover'" /> 
      </body>
    </html>

  3. #3
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,563
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, it works ... thanks a lot ...

  4. #4
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,597
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Opera users will have a choice as to whether to allow that stylesheet change to apply or not.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •