36 users online (1 members and 35 guests)  


  Results 1 to 4 of 4

Related

  1. Custom cursor onmouseover question    Forum: CSS Forum
    Replies: 0
  2. Another Custom Cursor Question    Forum: CSS Forum
    Replies: 2
  3. custom cursor for scrollbar    Forum: CSS Forum
    Replies: 5
  4. custom cursor onmouseover?    Forum: HTML Forum
    Replies: 2
  5. highlight table script    Forum: Javascript Forum
    Replies: 1
  1. #1
    jtrapat1's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    2

    Custom Cursor Highlight

    I'm trying to highlight a row in a table and turn it gray when the user moves the mouse over a particular cell.

    I know how to do this in HTML -
    <tr onMouseOver=style.backgroundColor='silver'
    onMouseOut=style.backgroundColor='white'</tr>

    But how do I add this functionality to a .css?

    Thanks in Advance.
    John

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi there.

    Try -

    onMouseOver="this.className='newClass'

    Then make a .newClass in your .css file to make it work.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    jtrapat1's Avatar
    New User

    Status
    Offline
    Join Date
    Sep 2002
    Posts
    2
    Thanks for the response.

    I just don't know how to define this in my .css file.

    Can't I make a new tag for TR like the TD tag:

    tr {

    color:#000000;
    font-size:12
    }

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hmm. You are better off using classes.

    Try my tutorial, http://css.somepeople.net , its got an intro to classes.

    By using classes you are not limited to one tag. It can apply to anything.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread