Why Is Supersleight Failing Me?

Discussion in 'Web Design and Development' started by Makosuke, Feb 19, 2008.

  1. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #1
    I recently discovered and immediately started loving SuperSleight, a tiny little script that claims to automatically handle transparent-ifying alpha-channel PNGs for IE6 without doing anything but feeding it to IE6 in the header.

    And it worked fantastically on the first couple sites I tried it on, for example:
    http://taigadesign.com/

    But now I'm trying to use it for what seems to be an even simpler situation (translucent box over an image), but it's failing. Not that it's something to cry about, but given that it worked before, and there's no apparent difference between the two situations, I'm really curious as to why it's choking this time. Page in question, with SuperSleight added to the header in a conditional comment:
    http://willowcreekorganicfarms.com/index-alt.html

    It's obviously doing something, since the background images are disappearing entirely rather than getting the "off-white background" treatment, just not what I want. No other scripts on the page (I've noticed that SS chokes if you try to run it on the same page as an embedded GMap), nothing even remotely tricky in the code.

    Anybody familiar with SuperSleight care to venture a suggestion?

    [Edit: And it's not that there's a transparent PNG within the page content; it does the same thing if I remove that.]
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    It's kind of weird because you can see the image for a moment then it disappears. You can try giving the image a z-index of 2 or something to see if that pops it up on top of the other image. IE has issues with getting the stack order confused.
     
  3. Makosuke thread starter macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #3
    That was a good thought, angelwatt, but after an hour of trying to whittle it down to a test case I finally got it--SuperSleight will apparently only work on the background of an element with an explicit width set.

    The page I linked that worked, I was setting a width. The second one, I was just using the containing element's width. Stick an explicit width on the elements with backgrounds and bingo, it works.

    Well, almost. For some reason the SuperSleighted background isn't being positioned properly--it seems to be giving itself "top" even if I specify "bottom center". Big improvement, but still annoying from a "why?" perspective. Guess that's what you get for using scripts you don't understand properly yourself.

    Same URL if anybody has suggestions:
    http://willowcreekorganicfarms.com/index-alt.html
     
  4. werther macrumors regular

    Joined:
    May 15, 2006
    #4
    Though I never used it nor heard of it I followed your link to the supersleight site and read this on the home page:

    The pitfalls

    So, whilst support for PNG transparency in IE5.5 and 6 is possible, it’s not without its problems.
    Background images cannot be positioned or repeated
     
  5. Makosuke thread starter macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #5
    Yeah, I noticed that too after posting my comment.

    That's what you get for not carefully reading the documentation.

    (Ok, in my defense, I actually mis-skimmed it and had sort of assumed those were limitations that SuperSleight fixed, which of course it doesn't. On a more careful read-through to troubleshoot I realized it was a limitation overall. As if I didn't have enough reasons to hate IE6.)
     

Share This Page