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
Problems with opacity
Old 01-03-2008, 02:40 PM Problems with opacity
Webmaster Talker

Posts: 626
Trades: 0
I have set a header section of my webpage to an opacity of 40%. I am trying to have a <img> tag within the header, but I want opacity at 100%.

For some reason ALL elements that are placed within the header section are inheriting the opacity of 40%.

Does anyone know how to fix this??

here is what I have:
HTML Code:
#container {
   background-color: #ffffff;
   width: 780px;
   margin: 25px auto 0 auto;
   border: 2px solid #000000;
}

#header {
   background: url(../images/header-bg.jpg) no-repeat top left;
   width: 100%;
   height: 250px;
    opacity: .4;
    -moz-opacity: .4;
    filter: alpha(opacity=40);
}

.moduletable-logo {
   float: left;
   opacity: 1;
   -moz-opacity: 1;
   filter: alpha(opacity=100);
}

#logo {
    margin: 30px 20px 20px 20px;
}
jim.thornton is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-03-2008, 03:26 PM Re: Problems with opacity
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
For some reason ALL elements that are placed within the header section are inheriting the opacity of 40%.
That's because that is the way it works, opacity is inherited from the 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 01-15-2008, 02:26 PM Re: Problems with opacity
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
One possible solution to this is the place the image outside of the div, but then position it absolutely or however to appear to be within the header.
__________________
Join me on
Please login or register to view this content. Registration is FREE
wayfarer07 is offline
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Reply     « Reply to Problems with opacity
 

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.11662 seconds with 12 queries