IE bold text + opacity problem
You know how IE's alpha opacity filter ruins boldface text?
<div style="width:100%; filter:alpha(opacity=90); font-weight:bold;"> Hello world! </div>
If you're using IE, you can see the problem in action here:
Hello world!
I discovered this while tweaking the opacity filter function I wrote about earlier.
After much fruitless Googling and consulting with webdev experts, I couldn't find a fix. And like most solutions, I had to stumble upon it at the eleventh hour: adding a background color or image to the container element will fix the IE opacity rendering problem.
<div style="width:100%; filter:alpha(opacity=90); font-weight:bold; background-color:#fff"> Hello world! </div>
Here it is again, with the fix:
Hello world!
Hopefully the search engines will find this page and no one will have to suffer as I have ever again.
UPDATE: SZOJ reader Andre points out that this bug probably surfaced when MS introduced ClearType rendering, which probably explains why the bug goes away when "font smoothing" is disabled.
55 Comments:
p.s. yes, I am aware that the blog layout is hosed in IE. Dunno when that happened, but I'm working on it. ;)
Interesting... a while ago I found a duplicate characters but in IE that could be fixed by applying a background color:
http://www.bingbangboom.us/projects/cssFixes/floatRowIE6/
background: transparent also made the fix work, strangely enough...
Seems to me that this could be fixed/applied automatically using CSS JS expressions. Though I don't use them that much so I might be wrong.
Can anyone provide the code for this. Basically, set the item with alpha set's background to be the same as it's parent.
Gee, i'm using IE6 right now and cannot see a difference between the two examples...
Andre: yeah, a few people pointed out that disabling "font smoothing" seemed to fix the problem. However, that's not something we can force from the client side.
Nice one - thanks for writing about this.
Hello Friend i wanted your help in winning me the World's Biggest SEO Contest for v7ndotcom
elursrebmem and also the v7ndotcom elursrebmem
So can you please put my websites link in your website.
Also Please Check out more details at my Get paid to post forums
THANK YOU!!!
I was using your opacity script and ran into the same problem and nothing would fix it...until i found this post! great!
Thank you!
background:transparent didn't work for me, but a solid color did. Wonderful.
Thanks! Potentially millions of my company's users will enjoy the fruits of your labors. :)
Very much appreciated - saved me from a major headache.
Thank you so much! You saved me many headaches and time with that problem on my blog!
THANK YOU! You saved me.
Two years on, and I've just hit this same problem playing with a jQuery plug-in. I can confirm it affects IE7 in the same way as IE6. Nothing got fixed there, so it may be an OS rendering problem rather than a browser problem.
Thanks for posting the solution - has saved me many hours of effort.
HI DANIIL KULCHENKO!
I KNOW ABOUT YOU!
YOU GO TO EAS AND ARE IN 7th GRADE!
SO TAKE THAT!
WATCH YOUR BACK! NOT A THREAT JUST A FRIENDLY REMINDER!
thanks for this. it was driving me insane until i found your post. sheers.
Ayesha takia hot nude sexy bikini wallpapers free
Great solution. Thanks for saving another XX hours of cursing IE (which I liked a lot until now)
Hi, I found this same problem to also happen with transparent png's as the background of an anchor element. Here is a site I am working on at my job. Look at the black scroller triangles in IE 7. I am really lost with this one, but it seems that the bolding problem is happening to the image. More weird than that is that there are no bolding rules for anchors in the body of the document, which is where these scrollers are. I cannot add a background-color to these because they need to be transparent. Do you think this is the same problem?
Thanks a lot, I was going crazy with this bug in IE6.
Moreover I found out that IE7 have some similar problems using ClearType. Not really the same but using Scriptaculous fade in(Appear), disables ClearType rendering on text.
I found out a patch to jQuery that is extensible for Scriptaculous adding this line in Effect.Appear.afterFinishInternal:
if(Prototype.Browser.IE)effect.element.style.removeAttribute('filter');
In a note to jason, this error is of course nothing to do with the OS but with the browser, as Firefox and Safari (and maybe Opera) don't manifest this weird behavior in Windows.
Just three little words: GOD BLESS YOU !!!
You save me from the biggest problem that i ever had.
Thank you and good look always.
Why dont you use Mozilla firefox download http://www.mypiju.com
THANK YOU! I've spent half of my day putzing around Google trying to find a fix and I finally found this blog post. Our company has been trying to find a fix for t his for a long time now!
Best!
Thank you for posting about this. If you hadn't pointed it out (and if Google didn't give your site as much love) I'm afraid I would've spent a lot of time trying to figure this out!
Thanks a lot..
I'd love to add another hour to the pile of hours lost to this retarded bug. Thank you so much for the easy fix!!!
Awesome, thanks so much!! I've been looking for a solution for this awhile now!
THANK YOU!!!
I have working whit this for like 5 hovers and writing different scripts. I's irritate me that is was sow simply! XP
But thanks any way;)
Thanks for the little solution and yes, it is easy to find in searches. I referenced it and gave a backlink in http://drupal.org/node/344046.
Thanks a lot for this - I'm using Dojo and I ran into this problem with dojo.fadeIn and generally using dojo.animateProperty to fade text in IE7. This was the fix i needed.
Thank you very much for this solution, I was tearing my hair out for a week trying to fix this.
Thanks a lot, This IE's problem was really a great pain...Now i have answer to that...
Thanks a lot - it was very useful. And for those who get here through google:
You might need this if you have a scriptaculous fade in or fade out effect. It will get ugly if you don't have a background color set in IE.
FUCK DUDE, you are damn awesome!
Thanks a LOT!
BTW, this doesn´t happen when the font-color is set to WHITE . Dunno Why =/
Thank you, I too spent time but
never found the answer
That's awsome! Dude you're a great guy!
But too bad there is no way to fix it if you need background:transparent;
:((((
Dude! I googled the solution for transparent bg!
its over here and its working!
http://www.hedgerwow.com/360/bugs/fix-ie-opacity-text.html
if the link gets cut out or broken contact me dipish {at} mail . ru
Thank! My problem was with an all black image and your fix worked.
Thanks man.. :D Life saver
The background isn't the only criteria to fix the opacity. On your test DIV, you set its width to 100% (which usually is useless since a DIV is a block level element), remove it and it just won't work anymore.
Sure it won't look ugly but it won't be opaque either… You might not see the difference with an opacity of 90% but try with 50%.
The solution is a width + background
you must add digg or stumbleUpon link, a twitter link would've been nice.....
I spent hours to find this post... Thanks though
Scott, you rock! I had almost given up on finding a solution to this when I found your post on Google.
Perfect, thanks!
You are the most brilliant person in the interweb.
Brilliant!
Awsome! I had the same issue with IE7 adding a somewhat border around my text when I made the entire element translucent.
Thank You!
I just ran into this myself, thanks for solving it for me :)
What when it needs to have a transparent bg.
I'm sick of that browser!
THANK YOU! I was racking my brain trying to figure this out. Very helpful.
Thank you greatly for this info... was very unsightly.
thanks dude thanks a lot
i was stuck in this problem for a long time
thanks a lot to resolve out this problem
Thanks! Just saved my life ;)
This has solved the issue. Thanks a lot.
Post a Comment
<< Home