SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Background-attachment bug in Firefox ?

    Hi Everyone,

    I would like to inquire about an apparent bug in firefox.

    The following code is supposed to display a background image on the top right part of a table. It works with IE but in firefox it displays the image in the top right of the whole page. I want it to be fixed and display only on the top right of that table because there is another table on top.

    Code:
    <table width="100%">
    		<tr style="background-image: url(Promo-111.gif); background-repeat:no-repeat; background-attachment:fixed; background-position:top right">
    		<td ><p>Image test</p></td>
                    </tr>
    </table>
    You can view an example at the following URL:
    HTTP://www.psaad.com/temp/test4.htm

    I seemed to have fixed the problem but not knowing why, is it a bug or is there an actual explanation for this.

    If I change the background-attachment to scroll then it will work both in IE and Firefox.

    Could someone explain to me what is going on?
    Patrick S.
    Comp. Sci. & Digital Image & Sound Undergrad
    Concordia University

  2. #2
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you want the background to appear in just that one row or the whole table (and yes, Gecko-based browsers -- FireFox being the most famous -- do have some issues with CSS and tables)?

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In just that row/column.

    Thanks.
    Patrick S.
    Comp. Sci. & Digital Image & Sound Undergrad
    Concordia University

  4. #4
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Validate and fix your html errors. You are also using Xhtml end tags though you've declared html as your doctype. Also, you are using deprecated html elements.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd probably stick a DIV container inside that cell then and put the background on that.

    Let me see what I can cook up that doesn't require it when I get back home though (heading to the library).

  6. #6
    SitePoint Member
    Join Date
    Nov 2004
    Location
    canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Schulz
    I'd probably stick a DIV container inside that cell then and put the background on that.

    Let me see what I can cook up that doesn't require it when I get back home though (heading to the library).
    Any luck yet?
    Patrick S.
    Comp. Sci. & Digital Image & Sound Undergrad
    Concordia University

  7. #7
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not yet (been pretty busy and actually LOST the thread when I got home). I'll get back on it today.

  8. #8
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, Internet Explorer 7, FireFox and Opera are positioning it at the top of the whole page. IE 7 is also being a punk with the way it renders it too.

    Now, this is going to sound crazy, but try removing background-attachment: fixed; from the style rule and see what happens. Is that the effect you're trying to achieve?

  9. #9
    SitePoint Member
    Join Date
    Nov 2004
    Location
    canada
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea thats what I wanted, Thanks Dan!

    Im guessing that its a bug with the browser!
    Patrick S.
    Comp. Sci. & Digital Image & Sound Undergrad
    Concordia University

  10. #10
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE has more bugs than Carter has little liver pills... Even IE 7 is not "immune" from this fact of life.


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
  •