Reply
Opaque image on a transparent background
Old 11-03-2009, 08:24 AM Opaque image on a transparent background
Average Talker

Posts: 16
Trades: 0
I have recently changed the design of a site to incorporate a transparent background in div containers using the new CSS3 styles. The only problem is that any images I have within these div containers also become transparent.

The page in question is a div container with a table inside. The image (a jpeg with solid white background) is placed inside the table with a div of it's own for styling. I have tried setting opacity for the image div as well as background colours and images, none of which work. I have also tried to give the table cell a background colour.

Any ideas would be brilliant!

Thanks,
Dan
superdan_35 is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 11-03-2009, 12:25 PM Re: Opaque image on a transparent background
King Spam Talker

Posts: 1,008
Location: Kokkola, Finland
Trades: 0
how about a feckin url?! oops sorry - wrote what i was thinking there - but seriously a url would help lot
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 11-03-2009, 01:20 PM Re: Opaque image on a transparent background
Average Talker

Posts: 16
Trades: 0
No need to be like that

http://www.beehappy.me.uk/bags/darli...ag/prod_3.html

Also, the homepage has an image slider which has the same problem in Firefox, but in IE the image is solid, http://www.beehappy.me.uk/index.php

Thanks
superdan_35 is offline
Reply With Quote
View Public Profile
 
Old 11-03-2009, 03:30 PM Re: Opaque image on a transparent background
King Spam Talker

Posts: 1,008
Location: Kokkola, Finland
Trades: 0
have you tried just setting the background colour to white without using rgba?
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 11-03-2009, 04:13 PM Re: Opaque image on a transparent background
LadynRed's Avatar
Super Moderator

Posts: 8,824
Location: Tennessee
Trades: 0
Quote:
The only problem is that any images I have within these div containers also become transparent.
That's because the transparency is INHERITED and there's not much you can do about it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Old 11-03-2009, 05:14 PM Re: Opaque image on a transparent background
King Spam Talker

Posts: 1,008
Location: Kokkola, Finland
Trades: 0
are you sure? i was just reading this and it states
"RGBa on the other hand sets colour transparency only for the element that I am declaring values for and the transparency is not inherited by child elements." http://forabeautifulweb.com/blog/abo...ready_to_rock/ so i'm a bit confused
davemies is online now
Reply With Quote
View Public Profile Visit davemies's homepage!
 
Old 11-04-2009, 06:50 AM Re: Opaque image on a transparent background
Average Talker

Posts: 16
Trades: 0
Tried that as well and still no joy. I have decided to use a transparent PNG for the container background instead and this has solved the problem. Not what I wanted to do, but it works so I can;t complain!

Thanks for all the advice,
Dan
superdan_35 is offline
Reply With Quote
View Public Profile
 
Old 11-04-2009, 04:59 PM Re: Opaque image on a transparent background
LadynRed's Avatar
Super Moderator

Posts: 8,824
Location: Tennessee
Trades: 0
Yes.. well.. CSS3 is NOT fully supported by all browsers either so, only some things will work
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Opaque image on a transparent background
 

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.19254 seconds with 13 queries