Loading ...
Sorry, an error occurred while loading the content.

FireFox "fixed" background-attachment issue

Expand Messages
  • mark.deibert
    Does anyone know of a hack of any sorts to get around the bug in FireFox that does not allow scrolling backgrounds in Divs? This is not an issue in IE, which
    Message 1 of 4 , Dec 12, 2006
    • 0 Attachment
      Does anyone know of a hack of any sorts to get around the bug in
      FireFox that does not allow scrolling backgrounds in Divs? This is not
      an issue in IE, which is great, but we need both IE and FireFox to work
      the same. Have you seen any tricks to get around this?

      I haven't tested this in Opera yet. I hope it works.


      Thanks guys :-)

      Mark
    • randomjuju
      Hi there! I m not entirely sure I understand what you re asking; can you share any examples? Thanks! -Jon
      Message 2 of 4 , Dec 12, 2006
      • 0 Attachment
        Hi there!

        I'm not entirely sure I understand what you're asking; can you share
        any examples?

        Thanks!

        -Jon

        --- In ydn-javascript@yahoogroups.com, "mark.deibert"
        <mark.deibert@...> wrote:
        >
        > Does anyone know of a hack of any sorts to get around the bug in
        > FireFox that does not allow scrolling backgrounds in Divs? This is not
        > an issue in IE, which is great, but we need both IE and FireFox to work
        > the same. Have you seen any tricks to get around this?
        >
        > I haven't tested this in Opera yet. I hope it works.
        >
        >
        > Thanks guys :-)
        >
        > Mark
        >
      • mark.deibert
        Hey Jon, It s not a YUI issue. It s a internal FireFox thing. Try put a background image in a scrollable div, set backgound-attachment to scroll , then scroll
        Message 3 of 4 , Dec 12, 2006
        • 0 Attachment
          Hey Jon,

          It's not a YUI issue. It's a internal FireFox thing. Try put a
          background image in a scrollable div, set backgound-attachment
          to 'scroll', then scroll it. The background is supposed to scroll
          along but it doesn't. It stays fixed. This is a bug that doesn't
          exist in IE. I was just wondering if anyone came accross a a work
          around.

          Mark :-)

          --- In ydn-javascript@yahoogroups.com, "randomjuju"
          <jon.chambers@...> wrote:
          >
          > Hi there!
          >
          > I'm not entirely sure I understand what you're asking; can you share
          > any examples?
          >
          > Thanks!
          >
          > -Jon
          >
          > --- In ydn-javascript@yahoogroups.com, "mark.deibert"
          > <mark.deibert@> wrote:
          > >
          > > Does anyone know of a hack of any sorts to get around the bug in
          > > FireFox that does not allow scrolling backgrounds in Divs? This
          is not
          > > an issue in IE, which is great, but we need both IE and FireFox
          to work
          > > the same. Have you seen any tricks to get around this?
          > >
          > > I haven't tested this in Opera yet. I hope it works.
          > >
          > >
          > > Thanks guys :-)
          > >
          > > Mark
          > >
          >
        • randomjuju
          I see. Well, you might try adding an event listener to that div s scroll event and then adjusting the image as appropriate. Maybe something like:
          Message 4 of 4 , Dec 12, 2006
          • 0 Attachment
            I see.

            Well, you might try adding an event listener to that div's "scroll"
            event and then adjusting the image as appropriate. Maybe something like:

            YAHOO.util.Event.addListener(myDiv, 'scroll', function(event) {
            YAHOO.util.Dom.setStyle(myDiv, 'background-position', '0px ' +
            myDiv.scrollTop + 'px') });

            I have this nagging idea that Mozilla doesn't get the onscroll event
            right for some reason, but I forget exactly what it does wrong. A
            workaround might be to poll at regular intervals and update the
            background image that way.

            Neither solution is really pretty, but I suspect they'll get the job done.

            Does that sound sane?

            Thanks!

            -Jon

            --- In ydn-javascript@yahoogroups.com, "mark.deibert"
            <mark.deibert@...> wrote:
            >
            > Hey Jon,
            >
            > It's not a YUI issue. It's a internal FireFox thing. Try put a
            > background image in a scrollable div, set backgound-attachment
            > to 'scroll', then scroll it. The background is supposed to scroll
            > along but it doesn't. It stays fixed. This is a bug that doesn't
            > exist in IE. I was just wondering if anyone came accross a a work
            > around.
            >
            > Mark :-)
            >
            > --- In ydn-javascript@yahoogroups.com, "randomjuju"
            > <jon.chambers@> wrote:
            > >
            > > Hi there!
            > >
            > > I'm not entirely sure I understand what you're asking; can you share
            > > any examples?
            > >
            > > Thanks!
            > >
            > > -Jon
            > >
            > > --- In ydn-javascript@yahoogroups.com, "mark.deibert"
            > > <mark.deibert@> wrote:
            > > >
            > > > Does anyone know of a hack of any sorts to get around the bug in
            > > > FireFox that does not allow scrolling backgrounds in Divs? This
            > is not
            > > > an issue in IE, which is great, but we need both IE and FireFox
            > to work
            > > > the same. Have you seen any tricks to get around this?
            > > >
            > > > I haven't tested this in Opera yet. I hope it works.
            > > >
            > > >
            > > > Thanks guys :-)
            > > >
            > > > Mark
            > > >
            > >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.