Transparent PNG in IE6 - how to influence the background colour?

M

+mrcakey

Is there a way to influence what colour is displayed in the "background
where the transparency is supposed to be" for PNG's in IE6? At the minute
I've got an ugly grey. Would be nice to change it to a better colour so the
poor sods still using IE6 don't think I intended it that way.
 
E

Els

+mrcakey said:
Is there a way to influence what colour is displayed in the "background
where the transparency is supposed to be" for PNG's in IE6? At the minute
I've got an ugly grey. Would be nice to change it to a better colour so the
poor sods still using IE6 don't think I intended it that way.

Is it an image that is vital to the HTML, or could you make it a
background image? Background images can be made to appear transparent
in IE6 in CSS.
 
J

Jonathan N. Little

+mrcakey said:
Is there a way to influence what colour is displayed in the "background
where the transparency is supposed to be" for PNG's in IE6? At the minute
I've got an ugly grey. Would be nice to change it to a better colour so the
poor sods still using IE6 don't think I intended it that way.


<object type="image/png" width="100" height="100" data="pretty.png">
<img src="ugly.gif" width="100" height="100" alt="For poor sods with IE">
</object>
 
M

+mrcakey

Els said:
Is it an image that is vital to the HTML, or could you make it a
background image? Background images can be made to appear transparent
in IE6 in CSS.

--

It's part of the main HTML. It's a very unimportant site, just for our
local football group which is 24 people, but I'd rather they see it in its
best light (just in case any of them know anyone that needs a site doing).
Don't know how many of them are actually using IE6 - they're largely allied
to a university, which means they're at the mercy of their IT department,
although in my experience, universities tend to upgrade quite frequently so
it may be a non-issue.

+mrcakey
 
M

+mrcakey

Jonathan N. Little said:
<object type="image/png" width="100" height="100" data="pretty.png">
<img src="ugly.gif" width="100" height="100" alt="For poor sods with IE">
</object>

--

Good thinking. Didn't work for me though. I tried the somewhat less
subtle -

<!--[if lt IE 7]>
<img src="upgrade.jpg" width="323" height="577" alt="Your browser is poo"
style="float: right; margin-left: 2e" />
<![endif]-->
<!--[if !IE]>-->
<img src="wevegotrobinho.png" width="323" height="577" alt="Manchester web
design" style="float: right; margin-left: 2em" />
<!--<![endif]-->
<!--[if gt IE 6]>
<img src="wevegotrobinho.png" width="323" height="577" alt="Manchester web
design" style="float: right; margin-left: 2em" />
<![endif]-->

+mrcakey
 
J

Jonathan N. Little

+mrcakey said:
Jonathan N. Little said:
<object type="image/png" width="100" height="100" data="pretty.png">
<img src="ugly.gif" width="100" height="100" alt="For poor sods with IE">
</object>

--

Good thinking. Didn't work for me though. I tried the somewhat less
subtle -

<!--[if lt IE 7]>
<img src="upgrade.jpg" width="323" height="577" alt="Your browser is poo"
style="float: right; margin-left: 2e" />
<![endif]-->
<!--[if !IE]>-->
<img src="wevegotrobinho.png" width="323" height="577" alt="Manchester web
design" style="float: right; margin-left: 2em" />
<!--<![endif]-->
<!--[if gt IE 6]>
<img src="wevegotrobinho.png" width="323" height="577" alt="Manchester web
design" style="float: right; margin-left: 2em" />
<![endif]-->

+mrcakey
Why not just:

<!--[if lt IE 7]>
<img src="upgrade.jpg" width="323" height="577"
alt="Your browser is poo" style="float: right; margin-left: 2e" />
<![endif]-->

<!--[if gt IE 6]><!-->
<img src="wevegotrobinho.png" width="323" height="577"
alt="Manchester web design" style="float: right; margin-left: 2em" />
<!--<![endif]-->
 
I

Irina Rempt

Jonathan said:
<!--[if lt IE 7]>
<img src="upgrade.jpg" width="323" height="577"
alt="Your browser is poo" style="float: right; margin-left: 2e" />
<![endif]-->

<!--[if gt IE 6]><!-->
<img src="wevegotrobinho.png" width="323" height="577"
alt="Manchester web design" style="float: right; margin-left: 2em" />
<!--<![endif]-->

Is that <!--[if gt IE 6]><!--> a conditional thingy, i.e. IE sees it and
anything else just reads the whole line as a comment? In that case,
definitely yes.

Irina
 
J

Jonathan N. Little

Irina said:
Jonathan said:
<!--[if lt IE 7]>
<img src="upgrade.jpg" width="323" height="577"
alt="Your browser is poo" style="float: right; margin-left: 2e" />
<![endif]-->

<!--[if gt IE 6]><!-->
<img src="wevegotrobinho.png" width="323" height="577"
alt="Manchester web design" style="float: right; margin-left: 2em" />
<!--<![endif]-->

Is that <!--[if gt IE 6]><!--> a conditional thingy, i.e. IE sees it and
anything else just reads the whole line as a comment? In that case,
definitely yes.

Yep!

Personally, I despise using proprietary markup and prefer to use
standard markup with natural fall back of HTML, so I would go this
OBJECT|IMG method. Yes, you would leave out IE7's new support of
alpha-PNGs, but then hey, maybe MS will get around to problem supporting
OBJECT with IE8! If not, IE users will have to be content with limited GIFs!
 
I

Irina Rempt

Jonathan said:
Personally, I despise using proprietary markup and prefer to use
standard markup with natural fall back of HTML, so I would go this
OBJECT|IMG method. Yes, you would leave out IE7's new support of
alpha-PNGs, but then hey, maybe MS will get around to problem supporting
OBJECT with IE8! If not, IE users will have to be content with limited
GIFs!

I just use standard everything and spit on IE, but I can afford that because
nobody is paying me :)

I do tend to include a little note in the footer "Optimised for Konqueror
and Firefox" with a get-Firefox button, so people know *why* their browser
doesn't work properly.

Irina
 
J

Jonathan N. Little

Irina said:
I just use standard everything and spit on IE, but I can afford that because
nobody is paying me :)

I do tend to include a little note in the footer "Optimised for Konqueror
and Firefox" with a get-Firefox button, so people know *why* their browser
doesn't work properly.

Mine is a commercial site, but even so there is more than one way to
skin a cat. Whatever one does is web design it should not break the
usability of the page.

Many times not much is required to accommodate IE. I prefer not to use
hacks because they *always* come back to haunt you down the road. Using
standard markup, and CSS 2.1 can really reduce the amount of actual code
to content required for a given result.

If one abandons the *need* to make a page look *pixel-perfect* identical
cross-browser and OS (a fool's errand in my opinion) and approach the
design with flexibility in mind you can have a more pleasing result --
less aggravation in design -- less management and flexibility in
revision. So what if IE users see a leading vertical border on the first
link of horizontal navbar list because lack of ':first-child' support!
Or see no numbers on lists or outline headings because of no 'counters'
support! Maybe if we stop coddling IE either Windows users will wise-up
to the fact that IE is not the *only* Windows Internet Explorer, or MS
will wise-up that users may switch and fix their damn browser. Both
seems to be occurring.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top