isi333
02-18-2005, 10:42 AM
OK, well I'm trying to code a layout, and after trying numerous other ways, I have come to the conclusion that I need part of the image to be transparent. I want to use a transparent PNG because the gif looks just horrible.
So I've coded it and found IE doesn't like PNG transparency. When trying to work around this I came across this site:
http://www.koivi.com/ie-png-transparency/
Seemed like a good solution, so I've followed the instructions. However, this is not working, and I do not understand why it is going wrong. Here is the layout with the script implemented:
http://www.lachrymose.org/ballet/
As, you can see, with Mozilla, it looks fine, but the whole image is just a grey box in Internet Explorer.
Here is the source code for index.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<?php ob_start(); ?>
</head>
<body bgcolor="#9BA5C0">
<center>
<div style="position:absolute; top:10px; left:51px; z-index:2;">
<img src="ballet2.png" />
</div>
<div style="position:absolute; top:437px; left:51px; z-index:1; width:677px; background-
color:#ffffff;">
<div style="float:left; clear:left; height:65px; width:80px;"></div>
la la la la al alalal al la la la ala al ala a the quick brown fox jumps over the lazy dog Two
households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean.
From forth the fatal loins of these two foes
A pair of star-cross'd lovers take their life;
Whose misadventured piteous overthrows
Do with their death bury their parents' strife.
The fearful passage of their death-mark'd love,
And the continuance of their parents' rage,
Which, but their children's end, nought could remove,
Is now the two hours' traffic of our stage;
The which if you with patient ears attend,
What here shall miss, our toil shall strive to mend.
</div>
</center>
<?php
include_once 'replacePngTags.php';
echo replacePngTags(ob_get_clean());
?>
</body>
</html>
In the same directory are the image, and a file called spacer.png, which is 1px x 1px, transparent. It is encoded with the 8-bit PNG, and the transparency that is not aplaha transparency, and therefore should be binary, right?
In the directory there is also the replacePngTags.php file.
Help!
So I've coded it and found IE doesn't like PNG transparency. When trying to work around this I came across this site:
http://www.koivi.com/ie-png-transparency/
Seemed like a good solution, so I've followed the instructions. However, this is not working, and I do not understand why it is going wrong. Here is the layout with the script implemented:
http://www.lachrymose.org/ballet/
As, you can see, with Mozilla, it looks fine, but the whole image is just a grey box in Internet Explorer.
Here is the source code for index.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<?php ob_start(); ?>
</head>
<body bgcolor="#9BA5C0">
<center>
<div style="position:absolute; top:10px; left:51px; z-index:2;">
<img src="ballet2.png" />
</div>
<div style="position:absolute; top:437px; left:51px; z-index:1; width:677px; background-
color:#ffffff;">
<div style="float:left; clear:left; height:65px; width:80px;"></div>
la la la la al alalal al la la la ala al ala a the quick brown fox jumps over the lazy dog Two
households, both alike in dignity,
In fair Verona, where we lay our scene,
From ancient grudge break to new mutiny,
Where civil blood makes civil hands unclean.
From forth the fatal loins of these two foes
A pair of star-cross'd lovers take their life;
Whose misadventured piteous overthrows
Do with their death bury their parents' strife.
The fearful passage of their death-mark'd love,
And the continuance of their parents' rage,
Which, but their children's end, nought could remove,
Is now the two hours' traffic of our stage;
The which if you with patient ears attend,
What here shall miss, our toil shall strive to mend.
</div>
</center>
<?php
include_once 'replacePngTags.php';
echo replacePngTags(ob_get_clean());
?>
</body>
</html>
In the same directory are the image, and a file called spacer.png, which is 1px x 1px, transparent. It is encoded with the 8-bit PNG, and the transparency that is not aplaha transparency, and therefore should be binary, right?
In the directory there is also the replacePngTags.php file.
Help!