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
CSS Body and background image and opacity
Old 11-27-2009, 08:08 PM CSS Body and background image and opacity
pityocamptes's Avatar
Experienced Talker

Posts: 48
Trades: 0
When I do this in my CSS sheet:

body
{
background-image: url("images/Mask8.jpg");
background-position: 50% 50%;
background-repeat: no-repeat;
/* for IE */
filter:alpha(opacity=50);
/* CSS3 standard */
opacity:0.50;
}

Not only is the background picture filtered but so is my banner and other pics on the page. Why? I just want the background to be faded while everything else is over layed. Thoughts? Thanks!
__________________
"Skin in behalf of skin. A man will give up everything he owns in exchange for his life. But stretch out Your hand and strike his flesh and bones, and he will surely curse You to Your face."
pityocamptes is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-27-2009, 08:39 PM Re: CSS Body and background image and opacity
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep, that's what happens with opacity. It is inherited by ALL child elements and goes through the vertical "stack"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-29-2009, 07:45 PM Re: CSS Body and background image and opacity
Skilled Talker

Posts: 58
Trades: 0
Quote:
Originally Posted by pityocamptes View Post
I just want the background to be faded while everything else is over layed. Thoughts? Thanks!
Manipulate image in your image editor.

If everything else is placed over this image (nothing to see underneath?), I'm not clear on why you'd want to bother with opacity.

If I've misunderstood and there's something worth seeing underneath this image, save as a semi-transparent .png and apply a transparent png fix for ie6.
whatsherface_21 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Body and background image and 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.26994 seconds with 12 queries