Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Transparent Background Issues (especially in IE6)
Old 01-11-2008, 05:22 PM Transparent Background Issues (especially in IE6)
Novice Talker

Posts: 7
Name: Al
Trades: 0
Hi,

I'm building a website for a friend of mine. Basically, there's a section with a transparent grey PNG used for the background (by setting the background image URL in the default CSS sheet). This is all fine until I test it on IE6. I got through the initial prolem of IE6's hideous lack of PNG transparency by using this code in the IE6 CSS sheet:

* html img,
* html div,
* html .png{
position:relative;
behavior: expression((this.runtimeStyle.behavior="none")&&(t his.pngSet?this.pngSet=truethis.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none",
this.runtimeStyle.filter = "progidXImageTransform.Microsoft.AlphaImageLoade r(src='" + this.src + "', sizingMethod='image')",
this.src = "transparent.gif")this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().repl ace('url("','').replace('")',''),
this.runtimeStyle.filter = "progidXImageTransform.Microsoft.AlphaImageLoade r(src='" + this.origBg + "', sizingMethod='crop')",
this.runtimeStyle.backgroundImage = "none")),this.pngSet=true)
);
}


Then I put the background in the HTML page with this code:

<!--[if IE 6]>
<div id="transblock" style="background-image: url(images/blackbgrnd.png);"></div>
<![endif]-->


Only problem is that now the background seems to double up and place itself above the text and links of the rest of the page., effectivly leaving anything in that section untouchable by the user.

I've zipped the site and added it here (http://www.webdesignerforum.co.uk/in...pe=post&id=709) if anyone could have a look. If anyone's got any thoughts about this, I'd be incredibly greatful to hear them.

Cheers
Al
alfandango is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-11-2008, 07:04 PM Re: Transparent Background Issues (especially in IE6)
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
IE doesn't "do" .png alpha transparency

http://www.webmaster-talk.com/html-f...tml#post404167
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-13-2008, 04:41 AM Re: Transparent Background Issues (especially in IE6)
The Lion's Avatar
Novice Talker

Posts: 12
Name: David
Trades: 0
Exactly, and that's the real bummer with IE 6 and lower. I had this same problem a while back with one client who refused to step into the new world of IE 7 (they had IE 5). I was forced to do the 'same thing' by using .gif's instead. The only problem here is that the quality of the graphic drops significantly.

Good luck,
The Lion.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by The Lion; 01-13-2008 at 04:42 AM..
The Lion is offline
Reply With Quote
View Public Profile
 
Old 01-17-2008, 03:15 PM Re: Transparent Background Issues (especially in IE6)
BlackWater's Avatar
Experienced Talker

Posts: 31
Trades: 0
Your solution lies in killing Bill Gates and destroying Microsoft. Until someone does that your going to need to use an alpha filter to get IE to do transparencies, assuming you want to use PNG

In the head of the webpage. This directs the page if the browser is IE to use an additional style sheet:
Code:
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="trans_fix_ie.css" media="screen"/>
<![endif]-->
In the style sheet to fix the transparency issues:
Code:
  
.trans {
background: none;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/nav02.png', sizingMethod='scale'); }
This should fix your transparency problems.
__________________
Code:
if( $hungry ) { eat(); } 
    else { sleep(); }
BlackWater is offline
Reply With Quote
View Public Profile
 
Old 01-19-2008, 05:26 PM Re: Transparent Background Issues (especially in IE6)
carloncho's Avatar
Skilled Talker

Posts: 80
Name: Carlos
Trades: 0
I use Jquery plug-in that fix the transparency problem with IE6. I dont remember the name, but works in a project that i worked. Searcj Jquery plug-ins.
Maybe this plugin works like the BlackWater solution.
__________________
-----------------------

Please login or register to view this content. Registration is FREE
carloncho is offline
Reply With Quote
View Public Profile Visit carloncho's homepage!
 
Reply     « Reply to Transparent Background Issues (especially in IE6)
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.93451 seconds with 12 queries