SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BackgroundPositionX in Firefox not working

    Hi All.

    So I am setting the Background Position (x coordinate) in my stylesheet to -191px by default.

    I have an "onclick" function that takes place on the page. By default, the window I am using is hidden, so the -191px looks fine. Upon clicking "show", it should change the -191px to 0px in the javascript.

    My JS has this:

    $('bodybg').style.backgroundPositionX = '0px';

    In IE, it works like a charm, but surprisingly, it doesn't work in Firefox. Any reason why?

    Thanks,
    Bryan

  2. #2
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the "X" position is only an MSIE thing.

    I didn't realize I could say backgroundPosition = '-191px 0px'

    I think it works.


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
  •