SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    body image with fixed position in IE

    how come dropping this into the body does not work in IE?

    style="background:url(/rhythm5.gif)no-repeat 20px 55px; background-attachment:fixed;"

  2. #2
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It works for me?
    Perhaps your image path is wrong?

    I used:

    <!--
    body {
    background:url(images/adphoto_1.jpg) no-repeat 20px 55px;
    background-attachment:fixed;
    }
    -->
    as you did, and it worked for me.

    I don't think this is the issue, but I basically assigned the style to the body tag using CSS, where as it seems you are putting the style attribute right in the tag, which may be the problem - though it should not be.

  3. #3
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's an example: http://www.search-this.com/sean.html

    view source and you can see the css. Doesn't work in IE6. not sure about IE7?

  4. #4
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your example is not working in IE7 either.

    I really think you need a space after the ")" and before the "no-repeat".

    Additionally, I would write it exactly like this:

    Code CSS:
    body { background: url(rhythm5.gif) no-repeat fixed 50&#37; 50%; }

    Or use the exact code from NathanielB's post.

    Good luck,
    Cheers,
    Micky

  5. #5
    .* draziW tnioPetiS *. bronze trophy
    Join Date
    Jun 2004
    Location
    "Then I figure the most good good guy will win."
    Posts
    1,666
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, you may be experiencing cache problems... do not forget to flush it.

  6. #6
    SitePoint Zealot
    Join Date
    Dec 2006
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mhulse View Post
    Your example is not working in IE7 either.

    I really think you need a space after the ")" and before the "no-repeat".

    Additionally, I would write it exactly like this:

    Code CSS:
    body { background: url(rhythm5.gif) no-repeat fixed 50% 50%; }

    Or use the exact code from NathanielB's post.

    Good luck,
    Cheers,
    Micky
    Ah yes mhulse is right, the space between the closing bracket and the no-repeat is non existant, which is causing IE to not display the background as it thinks no-repeat is apart of your image path.


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
  •