Old 11-08-2005, 16:32   #1 (permalink)
paulanthony
mingin dawg baitch
 
paulanthony's Avatar
 
Join Date: Apr 2004
Location: Belfast
Posts: 1,041
Send a message via MSN to paulanthony
Transparency

Anyone...please...Im struggling in a sea of transparency...PNG support IE>? how do I do that? Or indeed using GIF's what options to tick for best results in photeshap. I want crisp clean text ontop of a busy background photo..
__________________
  Reply With Quote
Old 11-08-2005, 19:37   #2 (permalink)
MikeTC
Senior Member
 
MikeTC's Avatar
 
Join Date: May 2005
Location: Wirral / Chester
Posts: 178
Try http://people.brandeis.edu/~peelle/png/

I've used javascript before and just pasted this code in the head tag for IE 5.5+ browsers.

Quote:
<!--[if gte IE 5.5000]>
<script language="JavaScript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
{
for(var i=0; i<document.images.length; i++)
{
var img = document.images[i]
var imgName = img.src.toUpperCase()
if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
{
var imgID = (img.id) ? "id='" + img.id + "' " : ""
var imgClass = (img.className) ? "class='" + img.className + "' " : ""
var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
var imgStyle = "display:inline-block;" + img.style.cssText
if (img.align == "left") imgStyle = "float:left;" + imgStyle
if (img.align == "right") imgStyle = "float:right;" + imgStyle
if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
var strNewHTML = "<span " + imgID + imgClass + imgTitle
+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
+ "filter:progidXImageTransform.Microsoft.AlphaIma geLoader"
+ "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
img.outerHTML = strNewHTML
i = i-1
}
}
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->

Transparent gifs are usually ok if you don't have any sweeping curves.
  Reply With Quote
Old 12-08-2005, 03:15   #3 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 7,573
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
http://www.alistapart.com/articles/pngopacity/

I usually use a second stylesheet for IE, and I use that transparency filter in it. In order for your css to validate, you have to hide it though
Code:
<!--[if IE]> <link rel="stylesheet" type="text/css" href="ieStyleCorrect.css"/> <![endif]-->

PS: There are some slight differences in colour, though
  Reply With Quote
Old 13-08-2005, 07:39   #4 (permalink)
paulanthony
mingin dawg baitch
 
paulanthony's Avatar
 
Join Date: Apr 2004
Location: Belfast
Posts: 1,041
Send a message via MSN to paulanthony
Ta- I'll give those a shot.
__________________
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8