Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Transparent PNG in IE6 - how to influence the background colour?

Reply
Thread Tools

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

 
 
+mrcakey
Guest
Posts: n/a
 
      10-09-2008
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.

--
+mrcakey


 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      10-09-2008
+mrcakey wrote:

> 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.

--
Els http://locusmeus.com/
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-10-2008
+mrcakey wrote:
> 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>

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
+mrcakey
Guest
Posts: n/a
 
      10-11-2008
"Els" <(E-Mail Removed)> wrote in message
news:lvlyv7fk1l4k.15ooit23ndvfl$(E-Mail Removed)...
> +mrcakey wrote:
>
>> 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.
>
> --


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


 
Reply With Quote
 
+mrcakey
Guest
Posts: n/a
 
      10-11-2008
"Jonathan N. Little" <(E-Mail Removed)> wrote in message
news:4a422$48eebf71$40cba7b7$(E-Mail Removed)...
> +mrcakey wrote:
>> 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>
>
> --


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


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-11-2008
+mrcakey wrote:
> "Jonathan N. Little" <(E-Mail Removed)> wrote in message
> news:4a422$48eebf71$40cba7b7$(E-Mail Removed)...
>> +mrcakey wrote:
>>> 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>
>>
>> --

>
> 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]-->

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Irina Rempt
Guest
Posts: n/a
 
      10-11-2008
Jonathan N. Little wrote:

> <!--[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

--
"Of course it is happening inside your head, Harry, but why on earth
should that mean that it is not real?" --Albus Dumbledore
http://www.valdyas.org/foundobjects/index.cgi Latest: 10-Oct-2008
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-11-2008
Irina Rempt wrote:
> Jonathan N. Little wrote:
>
>> <!--[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!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Irina Rempt
Guest
Posts: n/a
 
      10-11-2008
Jonathan N. Little wrote:

> 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

--
"Of course it is happening inside your head, Harry, but why on earth
should that mean that it is not real?" --Albus Dumbledore
http://www.valdyas.org/foundobjects/index.cgi Latest: 10-Oct-2008
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      10-11-2008
Irina Rempt wrote:
> Jonathan N. Little wrote:
>
>> 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.


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.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Transparent png images in IE6 Greg Peters ASP .Net 3 03-27-2008 04:36 PM
ANN: PNG image CAPTCHA with PNG canvas available (SkimpyGimpy) aaronwmail-usenet@yahoo.com Python 0 04-18-2007 07:33 PM
Background transparent when 'background' is used JWL HTML 4 09-26-2006 05:37 PM
Adding a png with transparent background to a Image button KrippZ@gmail.com ASP .Net 4 06-20-2006 02:53 PM



Advertisments