473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

.png Transparency

58
Hey guys-

I've read that IE6 has issues handling .png images that make use of transparent backgrounds...any ways to get around this?

Tom
Jul 23 '07 #1
9 1697
drhowarddrfine
7,435 Expert 4TB
Yes but I don't have my links handy. Google for that and you'll find some javascript solutions for IE. Of course, .png works fine in modern browsers.
Jul 23 '07 #2
tburger
58
Modern browsers...yes..looks great in Firefox...

any specific search suggestions?

Thanks again, Dr.

Tom
Jul 23 '07 #3
drhowarddrfine
7,435 Expert 4TB
Actually, I forgot about IEs filter stuff that only works on IE but that's what you want. Here's an article explaining it all.
Jul 23 '07 #4
ctoz
13
: ) to cut a long story short...

Use css to vary the opacity (of any element, not just images)—PNGs not necessary:

img#mygif {filter:alpha(opacity:80);opacity:0.8;-moz-opacity:0.8}

"filter:alpha(opacity: )" is MSIE's proprietary code;

"opacity: ;" is standard CSS;

and "-moz-opacity: ;" is needed for some early versions of Mozilla.

Use "0.9", as some browsers choke on "1.0"... if you want things that shady.
Jul 24 '07 #5
tburger
58
Thanks for the input so far:

I am not primarily concerned with the opacity of the object, but with the opacity of the object's background. IE7, which I tested on yesterday, handles this background transparency properly, but IE6 and below does not. These browsers leave an ugly border around the image.

There are some javascript fixes for this, but I could only get it to work when the images were static on the page. My navigation system also uses a single .png image, but changes position based on which link is "hovered" over. The javascript is apparently broken by this :hover behavior and results in a larger mess than what I started with...I am also hesitant to rely so heavily on javascript because many people do not have this enabled.

The navigation model works on the same principles as Apple's home navigation bar. (I believe it is called the Navigation Matrix). I'm not sure how to handle this.

Any ideas would be of great assistance:

SITE

Tom
Jul 24 '07 #6
drhowarddrfine
7,435 Expert 4TB
Possibly not related but you have quite a few html and css errors that need fixing.
Jul 24 '07 #7
tburger
58
Possibly not related but you have quite a few html and css errors that need fixing.
Thanks for the heads up...

The CSS file ran clean...no errors, but a few places where repeated code can be consolidated...

What is the "alt" attribute inside of a link tag? The validation service says this is required, but I've never seen it used...

I didn't know that <br> needed a closing tag..Doesn't this represent a line break?
Is the proper sytanx <br></br>?

The validation service is not allowing the attribute onMouseOut, which I am using for java script...but this is the how the attribute is listed in Dreamweaver...I've seen "onmouseout" used, but I haven't had trouble with it in practice...

Concerning the transparency quesiton, I think the best option might be to just match the background on the image with the page itself, and stop worrying about inconsistent transparency...

Thoughts?

Tom
Jul 24 '07 #8
drhowarddrfine
7,435 Expert 4TB
The alt tag is for accessability for screen readers and browsers when images aren't displayed.

In xhtml, you need the closing />, so it's <br />

In xhtml, case matters so it's complaining it's not in lower case. In html, case does not matter.
Jul 24 '07 #9
tburger
58
Thanks for the clarification.

Tom
Jul 24 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Cecile Muller | last post by:
I've been trying to just open a png and display it, that way: <? header ("Content-type: image/png"); $im = imagecreatefrompng('empty.png'); imagepng($im); ?> But the transparency is not...
57
by: Piotr Wolski | last post by:
how to make my page that it was correct with every browser standard? for example when i change HTML's table size it has no effect when i see it under mozilla and has effect under Internet...
4
by: Matthias Czapla | last post by:
Hi! I want to resize uploaded GIF images. Currently I do it like this: <?php // ... $img = imagecreatefromgif($path); $img_scaled = imagecreate($new_width, $new_height);...
2
by: Robin Becker | last post by:
Has anyone done transparency with PIL & TIFF? I'm using PIL to generate a preview TIFF for embedding into an eps file and am being asked for the TIFF to support transparency. -- Robin Becker
3
by: Mr. x | last post by:
Hello, I would like that my image's background color will be transparent. What I have is only paintbrush. My image is *.jpg format (I have tried to save it as *.gif format, and I got less...
20
by: Nathan Sokalski | last post by:
I am trying to create graphics with GDI+ that include transparency. However, the transparency never seems to show up, even though my colors have an alpha value of 0. How can I generate a graphic...
6
by: tommaso.gastaldi | last post by:
In a previous post I have been asking about a way to test Alpha Transparency. Bob and Michael have kindly provided some ideas. Here I would like to share the function I have prepared, for the...
0
by: ZikO | last post by:
Hi. I've experienced one problem. Im using three froms. Two of them are maximized, whereas one is normal form with transparency. Transparency stops working, that is I can see the color which...
1
by: dragze | last post by:
Hi, On one of the pages of my site i use two javascripts, one makes transparency of png's work in IE, and the other embeds a flash player. Now use one of the scripts it works fine, use both and...
3
by: Martijn Mulder | last post by:
When I populate a ToolStrip with ToolStripButtons with a .png-image on it, will Windows understand the transparency of the .png file?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.