SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist Jedi007's Avatar
    Join Date
    Aug 2005
    Posts
    463
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    var for td background image?

    I've heard of style.background, style.backgroundImage, background, backgroundIm and all sorts of others but none work (of course I included the this.style....)

    onmouseover='this.style.backgroundImage="button_template_over.gif";this.style.cursor="hand"'

    whats the var for the background image in a td?

  2. #2
    SitePoint Wizard chris_fuel's Avatar
    Join Date
    May 2006
    Location
    Ventura, CA
    Posts
    2,750
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    that's because you need url() to encapsulate it.

  3. #3
    SitePoint Member
    Join Date
    Jul 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use Element.className to assign an element a new CSS class name.

    I find that this saves me alot of time.

    onmouseover="this.className = 'overClass';"
    onmouseout="this.className = 'normalClass';"


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
  •