...

View Full Version : Image Opaqueness In Html



conquer_maya
02-16-2005, 12:27 AM
I am having a problem with an html site i am doing. I am trying to lower the alpha of an image that is the background image for one of my tables.

However when I make the opacity lighter it makes all the text lighter even though this command is included within the <> with the background image source.

This is a strange problem and a little difficult to explain hopefully i made it clear. If anyone knows a way to fix this i would greatly appreciate it thank you.

bradyj
02-16-2005, 01:12 AM
Do you have a sample of the code you are using? There are a few ways to make opacity, some being just for IE, some being for firefox... so I'd need to see what and how you are doing it:)

rmedek
02-16-2005, 02:38 AM
I'd consider using pngs; IE doesn't support the alpha transparency of them but there are workarounds. Here's a site (http://lostbarrioartists.com) where I used that technique, dig around the source and see if maybe it can work for you...

conquer_maya
02-16-2005, 02:44 AM
Do you have a sample of the code you are using? There are a few ways to make opacity, some being just for IE, some being for firefox... so I'd need to see what and how you are doing it:)

Thanks for the quickly reply the command i am using is:

style = "filter:alpha(opacity=40)"

DooM_MonkeY
02-16-2005, 02:51 AM
i'd suggest u do somthing like:

<style>

.alphathing {filter:alpha(opacity=40);}

.alphathing *{filter:alpha(opacity=100);}

</style>

the * makes everything inside the .alphathing div or span or whatever fully opaque, so ud have to make a div inside a div

gsnedders
02-16-2005, 05:11 PM
That only works in IE, you'd need to use opacity as well to support Gecko based browsers and Safari.

bradyj
02-16-2005, 08:26 PM
that is IE only -- to do IE and Mozilla builds, you'd do:


filter:
alpha(opacity=50); /*IE */
-moz-opacity: 0.50; /* mozilla*/


But doing that is still not recommended, it's not a standard. PNG transparency would be best, then you'd have to use javascript or another filter to force IE to play nice:)

If the transparency is affecting the whole element, that makes sense -- say you have a div, and put transparency on that div, I'd imagine there would be scenerios where it would filter down to what's inside the div.

But to fix that, there doesn't seem to be much luck:
http://www.experts-exchange.com/Web/Web_Languages/CSS/Q_20945286.html

I would suggest the png method of choice.

_Aerospace_Eng_
02-16-2005, 08:28 PM
or another way that i found will work for FF

filter:
alpha(opacity=50); /*IE */
opacity: .5; /* mozilla*/

liorean
02-16-2005, 08:29 PM
Brady: You forget the standards way of doing it. (Supported by recent Mozillas and Safari.) <http://www.w3.org/TR/2003/CR-css3-color-20030514/#transparency>

gsnedders
02-16-2005, 09:10 PM
That's what I said... Just badly...

bradyj
02-16-2005, 09:23 PM
Brady: You forget the standards way of doing it. (Supported by recent Mozillas and Safari.) <http://www.w3.org/TR/2003/CR-css3-color-20030514/#transparency>

Ahh, I'm slipping:)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum