SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css not displaying properly with safari browser

    Hello,

    On my website, I have set the background in my stylesheets.
    In ie and ff, it displays find, but in safari, the background does not show up.
    How do I fix this problem?

    .NewBackgroundHome
    {
    margin-top : 0;
    margin-left : 0;
    margin-right : 0;
    margin-bottom : 0;

    background-color : Black;

    background-image : url('../images/new_back_home.gif');
    background-repeat : no-repeat;
    background-position : center center;
    z-index : -1;
    }

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    Try it 3ithout the negative z-index. I would avoid neg z-indexes. Just have postivie ones.

    Also try the shorthand method:

    Code:
    .NewBackgroundHome {
      margin:0;
      background: #000 url(../images/new_back_home.gif) no-repeat 50% 50%;
    }

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2009
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph,

    Thank you for helping me.
    I removed the z-index from all the backgrounds and did a test.

    I have one page just with the z-index removed:
    The Illusionist - Lucas Wilson

    and one using your idea of putting it all in one:
    The Illusionist - Lucas Wilson

    I am still having that issue.

    Thanks.

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    That second one seems to work fine for me in Safari. I'm not sure what the problem is. Make sure to refresh your page. It's difficult for me to say more, because I'm not too familiar with background images on tables. I don't do table layouts, but I gather bg images can be a bit buggy, though don't quote me on that.


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
  •