Opacity not working in IE.

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Opacity not working in IE.

Post by JellyFish »

I don't understand, filter: alpha(opacity=60); always worked be for. Did IE7 drop support for opacity or something? This is for frustrating.

EDIT: found out that I need to float the element in order to set the opacity in IE. What? That's retarted! Isn't there a way around this?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: Opacity not working in IE.

Post by superdezign »

It's an issue of the 'hasLayout' property. There are many ways to give an element hasLayout, floating being one of them. You can also do it with position: absolute, giving the element a set width or height, using display: inline-block, using IE's 'zoom' property, or using IE's 'writing-mode' property. The two last options don't validate and are IE-only.

Check the MSDN database for hasLayout documents for more information.
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

Re: Opacity not working in IE.

Post by JellyFish »

superdezign wrote:It's an issue of the 'hasLayout' property. There are many ways to give an element hasLayout, floating being one of them. You can also do it with position: absolute, giving the element a set width or height, using display: inline-block, using IE's 'zoom' property, or using IE's 'writing-mode' property. The two last options don't validate and are IE-only.

Check the MSDN database for hasLayout documents for more information.
AlRight, Thanks!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post by JAB Creations »

I use this in an Internet Explorer Conditional Comments Style Sheet on http://www.jabcreations.net/ when needing to bring someone's attention to a prompt...

Code: Select all

.fade {
filter: alpha(opacity=10);
}
Post Reply