1
Alan-A
Transparent Backgrounds in IE using PNGs
  • 2004/4/20 22:17

  • Alan-A

  • Not too shy to talk

  • Posts: 191

  • Since: 2004/2/17


Hi,

I'd like to be able to use semi-transparent backgrounds for the text areas of my pages so that I can keep my text legible where the background is a bit strong.

Risto's Posting in the Hacks News (https://xoops.org/modules/news/article.php?storyid=1418) and his thread in the Troubleshooting Forum address this problem for backgrounds and for images in img tags.

However as I'm only wanting backgrounds, I shouldn't need to use Risto's method - a browser sniffer for IE5.5+ and the Microsoft AlphaImageLoader filter in my css file should do the job. Netscape shows pngs perfectly, and I can live without transparency in IE5.0. And then I don't need to duplicate my pngs with gifs; my page files will be smaller as I'm not calling up the filter each of in my tables or table cells and I'm not packing css information in a remote file.

So much for the theory.
In practice, this solution does works great with simple html/css. And XOOPS already has a browser sniffer...
And it works fine in XOOPS too - as long as I call up the filter from my html code like this:
<td style="filter:progidXImageTransform.Microsoft.AlphaImageLoader
(enabled=true, sizingMethod=scale src='image.png');">.
but this makes my templates long and complicated and inflates page sizes, etc.

So the answer should be to call up the filter using "class" or "id" and putting the filter code in my theme's style.css file.
As I've said, this works in "normal" html/css. Unfortunately, it does not work in Xoops, even when I delete everything else from my xoops.css and style.css files to remove all possible conflicts.

WHY????

I'm using the same path to my transparent image file as I use in the body tag for my main background image, so this can't be the reason.

Does anyone out there know a way around this problem?

Many thanks in advance,

Alan


2
skalpa
Re: Transparent Backgrounds in IE using PNGs
  • 2004/7/20 20:41

  • skalpa

  • Quite a regular

  • Posts: 300

  • Since: 2003/4/16


AlphaImageLoader manual @ MSDN

Quote:
The object that the filter is applied to must have layout before the filter effect will display. You can give the object layout by setting the height or width property, setting the position property to absolute, setting the writingMode property to tb-rl, or setting the contentEditable property to true.




Advice: I you want to play with things like this, get the Internet Development manual of the MS-Platform SDK. That's a big fat download, but you get a big fat CHM with a lot of useful infos in it.

skalpa.>

Login

Who's Online

111 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 111


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits