473,225 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,225 software developers and data experts.

opacity and IE

I have a p tag defined as
..nav_current
{
opacity:.5;
}

which works fine in Mozilla, but IE doesn't act on it. Any way to get it
to work?

--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"
Aug 26 '07 #1
4 3018
Amer Neely wrote:
I have a p tag defined as
.nav_current
{
opacity:.5;
}

which works fine in Mozilla, but IE doesn't act on it. Any way to get
it to work?
If you had bothered to try doing a Google search for the terms "ie" and
"opacity" the first result would have told you that you need to do:

..nav_current
{
filter: alpha(opacity=50);
opacity:.5;
}
Aug 27 '07 #2
Nik Coughlin wrote:
Amer Neely wrote:
>I have a p tag defined as
.nav_current
{
opacity:.5;
}

which works fine in Mozilla, but IE doesn't act on it. Any way to get
it to work?

If you had bothered to try doing a Google search for the terms "ie" and
"opacity" the first result would have told you that you need to do:

.nav_current
{
filter: alpha(opacity=50);
opacity:.5;
}

Presumptuous of you to assume I hadn't.

I have the old Mandarin Design code as well, and it still doesn't want
to work. I've tried inline CSS as well as an external file.

..nav_current
{
color:black;
background-color:#9CCFC8;
filter:alpha(opacity=50);
opacity:.5;
-moz-opacity:.50;
}

<p class="nav_current">Home </p>
--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"
Aug 27 '07 #3
Amer Neely wrote:
Nik Coughlin wrote:
>Amer Neely wrote:
>>I have a p tag defined as
.nav_current
{
opacity:.5;
}

which works fine in Mozilla, but IE doesn't act on it. Any way to
get it to work?

If you had bothered to try doing a Google search for the terms "ie"
and "opacity" the first result would have told you that you need to
do: .nav_current
{
filter: alpha(opacity=50);
opacity:.5;
}


Presumptuous of you to assume I hadn't.
My apologies then.
I have the old Mandarin Design code as well, and it still doesn't want
to work. I've tried inline CSS as well as an external file.

.nav_current
{
color:black;
background-color:#9CCFC8;
filter:alpha(opacity=50);
opacity:.5;
-moz-opacity:.50;
}

<p class="nav_current">Home </p>
Seems to be some variant of the HasLayout bug.

Can be fixed with Holly hack:

<style type="text/css">
..nav_current
{
color: black;
background-color: #9CCFC8;
opacity: 0.5;
}
</style>
<!--[if lte IE 7]>
<style type="text/css">
..nav_current
{
filter: alpha(opacity=50);
height: 1%;
}
</style>
<![endif]-->
<p class="nav_current">Home</p>
Aug 27 '07 #4
Scripsit Nik Coughlin:
>>If you had bothered to try doing a Google search for the terms "ie"
and "opacity" the first result would have told you that you need to
do: .nav_current
{
filter: alpha(opacity=50);
opacity:.5;
}

Presumptuous of you to assume I hadn't.

My apologies then.
There was no need for your apology, since the OP explicitly specified CSS
code that does not contain the IE-specific code, so it was quite logical to
assume ignorance.
> <p class="nav_current">Home </p>

Seems to be some variant of the HasLayout bug.
Probably.
Can be fixed with Holly hack:
...
height: 1%;
With the given information, there's no need to use the tricky version that
illogically sets the height to 1% and relies on the browser implementing it
against the CSS specifications. To give an element "layout" in the odd IE
sense, you can also set its width, and here you could set just width: 100%.
This has the same effect as the default width of auto, in the absence of
other styling, and no other styling was referred to.

It looks odd to call the string "Home " a paragraph, as the OP's markup
does, and maybe it's not the real markup. But the real markup, and the real
CSS code, was not revealed.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Aug 27 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dean Edwards | last post by:
I am attempting to change the opacity of an image. I can modify opacity ok: function flip(pic, opacity){ pic.style.filter = 'alpha(opacity='+opacity+')'; } But I'm not familiar with...
0
by: kaeli | last post by:
All, The following is an example of what I'm trying to do: I have a box set to be partially transparent. I want the text in the box to NOT be partially transparent. This works in IE, but NN7 has...
3
by: Marek Mänd | last post by:
This posting will express my concern about the future of css3 forthcoming recommendation. I think for long time now, that the current implementation of CSS attribute opacity is less than usable...
6
by: Robert A. Boudra | last post by:
As you will probably guess, I'm just starting out with VB.net although I'm a long time VB developer. I was playing around with the Opacity property of a form and have found that I can set the...
1
by: mhoeneveld | last post by:
I am writing a small script to fade the opacity of an image/object. The script itself works fine only I do have some unwanted behaviour. I do use a tablecell object and the mouseover/mouseout to...
2
by: reidarT | last post by:
I want a windows form to act like the one in Outlook when you get a new message and it is visible for about a couple of seconds and then the opacity decreases and the form dissapears in the end I...
16
by: Darko | last post by:
Hi, I'm trying to get and set an element's opacity, but I'm stuck with, what a hell of surprise, Internet Explorer. As for getting the element's opacity, I have the following (not working) lines...
15
by: Sunny | last post by:
Hi, I can change the lement opacity in IE using. abc.style.filter = 'alpha(opacity=' + 10 + ')'; But this dont work in firefox, In firefox it throws error. How I can change the opacity of an...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.