Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 10-05-2007, 01:58 PM Opacity Problem
Super Talker

Posts: 131
Trades: 0
I have this div
#content {
z-index:100;
width:698px;
min-height:300px;
padding:0px;
background-color:#FFF;
-moz-opacity:0.6;
filter:alpha(opacity=60);
margin:0px;
float:left;
}

That is just a 60% white background.

Then i have another div with just text on it with this
#text {
z-index:101;
width:698px;
height:auto;
padding:0px;
margin:0px;
background-color:inherit;
}

But it is still getting the opacity properties from the content div.

Any ideas?

Tim
}

Last edited by LadynRed; 10-05-2007 at 03:05 PM..
soap is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-05-2007, 03:07 PM Re: Opacity Problem
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First of all, z-index will be ignored unless your element is positioned either absolutely or relatively.

Is #text INSIDE #content ? If so, you've told it to inherit the background of it's parent.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 10-05-2007, 05:16 PM Re: Opacity Problem
Super Talker

Posts: 131
Trades: 0
Yeah it's inside BUT... i tried using a colored background for #text instead of inherit. (red) And it only made the red bg in the text div transparent as well.
soap is offline
Reply With Quote
View Public Profile
 
Old 10-05-2007, 06:40 PM Re: Opacity Problem
Super Talker

Posts: 131
Trades: 0
Help!!! Has to be worked out in 20 minutes! heh
Please
soap is offline
Reply With Quote
View Public Profile
 
Old 10-06-2007, 12:21 AM Re: Opacity Problem
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Transparency always gets inherited by the inner div whether you specify it or not. I wish it weren't the case because it reduces the usefulness of transparency a lot.

As far as I know all browsers are going to give the inner div the same transparency as the container div.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Old 10-06-2007, 02:24 PM Re: Opacity Problem
Super Talker

Posts: 131
Trades: 0
What a bummer.. No work arounds?
soap is offline
Reply With Quote
View Public Profile
 
Old 10-06-2007, 06:43 PM Re: Opacity Problem
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
I've never figured out a way around it, but there are smarter people than me so maybe someone has. I haven't seen it though.

I agree it's a bummer. I always thought it would make a nice effect for a drop down menu to have the background semi-transparent, but have the text be fully opaque. Unfortunately the text inherits the transparency. It can sill look ok if you choose the right color combination and opacity setting, but not usually quite what you want.

If you do find a solution please post it here. I've been hoping to find one for awhile.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
Reply With Quote
View Public Profile Visit vangogh's homepage!
 
Reply     « Reply to Opacity Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83254 seconds with 12 queries