ie text transparency problem

B

ben curthoys

i have a problem in IE6 whereby semi-transparent text in a div without a
background is rendered badly; it looks like the anti-aliasing is broken. it
works fine in mozilla.

obviously in this example setting the background to "red" would make things
look fine, but in real life the text will be on top of an image. can anyone
suggest a workaround?

actually, what i'm trying to do is display 80% opaque text on top of a 40%
opaque white box on top of an image, but if i put the text in the white box
i can't control its opacity separately and make it more opaque than its
container (which is fair enough). if anyone has a good way of achieving that
i'd be interested.

example html follows:

<html>
<body style="background: red;">

<div style="
position:absolute;
left:100px;
top:100px;
filter:alpha(opacity=25);
-moz-opacity:0.25;
background: white;
">
works fine with a background
</div>

<div style="
position:absolute;
left:200px;
top:200px;
filter:alpha(opacity=25);
-moz-opacity:0.25;
">
looks nasty in ie without a background
</div>


</body>
</html>
 
S

Schuylar Marshall

ben curthoys said:
i have a problem in IE6 whereby semi-transparent text in a div without a
background is rendered badly; it looks like the anti-aliasing is broken. it
works fine in mozilla.

I cannot answer your question but Eric Meyer may have part of the answer:
http://www.meyerweb.com/eric/css/edge/complexspiral/demo.html
in this example setting the background to "red" would make things
look fine, but in real life the text will be on top of an image. can anyone
suggest a workaround?

actually, what i'm trying to do is display 80% opaque text on top of a 40%
opaque white box on top of an image, but if i put the text in the white box
i can't control its opacity separately and make it more opaque than its
container (which is fair enough). if anyone has a good way of achieving that
i'd be interested.

I have a similar issue with IE5-6 CSS compliance. Funny thing is is that
IE:Mac 5.2 renders the above example correctly and IE5-6 for Windows does
not. Eric explains that IE claims of CSS 1 complaince may be a subset of
true CSS1 compliance. Funny that IE for Mac works and IE for Windows is
lacking here.
Unfortunately,


html>
<body style="background: red;">

yada yada yada

Hope it Helps
Sky
 

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

Top