PDA

View Full Version : IE Opacity



GardenGnome2
Dec 12th, 2008, 11:18 PM
When I set opacity to a div, the div always contracts when the zoom level is changed lower on the screen. If the zoom level was 100%, and I set it to 50%, the div would contract. Is there any way to try to avoid this?

Here's my code


<style type="text/css">
body {
background-color:red;
}

#div {
background-color:#fff;
border:1px solid #000;
filter:alpha(opacity=80);
opacity:0.8;
width:200px;
height:200px;
}
</style>

<div id="div"></div>

abduraooft
Dec 13th, 2008, 05:26 AM
Which is your IE version? Is it OK, when you remove that filter?

itsallkizza
Dec 13th, 2008, 09:43 AM
When I set opacity to a div, the div always contracts when the zoom level is changed lower on the screen.

Um, that's exactly what it's supposed to do... If you don't want it to contract, don't give it a zoom of less than 100%.

GardenGnome2
Dec 13th, 2008, 03:40 PM
What I mean by contracting, is that it doesn't make the whole div smaller, but some of the borders go away and the text gets cut off if there is any text.

When I remove opacity, it is fine.