The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

PNGs, Transparency, and older browsers

EinEin CaliforniaRegistered User regular
edited July 2007 in Help / Advice Forum
Quick question for all you web-saavy folks:

I have a table that is using transparent .pngs for drop shadows. It looks and works great in IE7 and Firefox, as far as I've tested, but in IE6 it looks godawful - the transparency doesn't work and it basically looks simply gradiented over a white background, which is not very flattering.

Is there a way to make these images just not load in these non-png-supportive browsers, rather than loading and looking like an eyesore? I'd much rather prefer those users didn't see the drop shadow at all than what should be one.

Ein on

Posts

  • LewishamLewisham Registered User regular
    edited July 2007
    I am going to presume you are using CSS.

    Most people will use a CSS hack script to disable things IE6 can't handle. IE6 will honour these (AFAIK, non-standard) tags:

    <!--[if lte IE 7]>PUT A DISABLING STYLESHEET HERE<![endif]-->

    More info: http://www.quirksmode.org/css/condcom.html

    Lewisham on
  • kitchkitch Registered User regular
    edited July 2007
    Yeah, transparent .pngs won't display correctly in IE6 as far as I know, but transparent .gifs do.

    kitch on
  • Steve BennettSteve Bennett Registered User regular
    edited July 2007
    Transparent PNG is semi-supported in IE 6. I use it on the website I built for a MMO my team and I are building. You can view the site here - the banner is a transparent PNG.

    The CSS needed for transparent PNG is:

    filter:progid: DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=image, src='templates/h_first/images/banner.png');

    (note: I just put a space put between "progid:" and "DXImage..." to prevent smiley face - you may have to remove space)

    "sizingMethod" can be image (don't scale), scale (scale to fit), or crop (crop image to fit).

    There are some shortcoming of this. One is that the image wont tile, so if you had a transparent/tiling image, that's out of the question. Another issue is that any text/objects on top of the transparent png are not focusable. This means links can't be clicked, forms can't be interacted with, and text can't be highlighted.

    Steve Bennett on
Sign In or Register to comment.