2 replies [Last post]
obay
Offline
newbie
Last seen: 7 years 20 weeks ago
Timezone: GMT+8
Joined: 2007-08-01
Posts: 4
Points: 0

How do I override the opacity setting?

.menuItem { background-color: #E0E18C; opacity: .65; filter: alpha(opacity=65); }

.menuItemText {
font-family: "Lucida Sans Unicode";
/* must not be opaque, override .menuItem*/
opacity: 1.0;
filter: alpha(opacity=100);

}

Company Profile

It doesn't work, i.e., the words "Company Profile" are still 65% opaque not 100% as defined in .menuItemText..

Help?

Chris..S
Chris..S's picture
Offline
Moderator
Last seen: 2 years 12 weeks ago
Timezone: GMT+1
Joined: 2005-02-22
Posts: 6078
Points: 173

You can't. Opacity is

You can't. Opacity is applied to the parent after all its content, including any child elements have been rendered. You can think of it as an operation that is applied as the parent is being drawn on its parent, much like the way elements are combined in photoshop (where a parent and its children would by similar to a group and its layers).

obay
Offline
newbie
Last seen: 7 years 20 weeks ago
Timezone: GMT+8
Joined: 2007-08-01
Posts: 4
Points: 0

Thank you! that cleared

Thank you! that cleared things up for me Smile im now using

onMouseOver="this.style.opacity = '1'; this.style.filter = 'alpha(opacity=100)';"

instead. It works perfect Smile

Thanks for the info! Smile