FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Transparent background image

 


Hojo
hiyas, i got a problem with my website atm. i stopped working on it a long time ago, and now i want to start working on it again.
the problem is that in the current design i had a transparent background. since i probably cant describe it very well, maybe a pic will help:

i want the silverish menu backgrouds to be 25% transperent.

until i stopped working on the site, i used this code:
Code:
<td style='filter: Alpha(opacity=75)'>

this code works with IE6.0, but doesnt work in firefox aswell as IE7.0beta

i did a search on the forum and the only thing that seemed to be similar was http://www.frihost.com/forums/vt-28801.html
but the problem doesnt get solved, since the filter command doesnt work for in any browser now apparently

is there any other way to make the background image for the menu transparent or would i have to redesign the menus?

if its of any importance the images i want to be transparent are .jpg and .gif
bladesage
Hojo wrote:
hiyas, i got a problem with my website atm. i stopped working on it a long time ago, and now i want to start working on it again.
the problem is that in the current design i had a transparent background. since i probably cant describe it very well, maybe a pic will help:

i want the silverish menu backgrouds to be 25% transperent.

until i stopped working on the site, i used this code:
Code:
<td style='filter: Alpha(opacity=75)'>

this code works with IE6.0, but doesnt work in firefox aswell as IE7.0beta

i did a search on the forum and the only thing that seemed to be similar was http://www.frihost.com/forums/vt-28801.html
but the problem doesnt get solved, since the filter command doesnt work for in any browser now apparently

is there any other way to make the background image for the menu transparent or would i have to redesign the menus?

if its of any importance the images i want to be transparent are .jpg and .gif


The filter property is only supported in IE. The others can't seem to match it.

Your best shot would be to edit the images you're using for the background. Make them in either .gif or .png, and if you use the right program, it allows you to set a transparent color. I don't know how much this can help you, or how, but it's the best I can do for the moment really. ONLY Internet Explorer supports filters.

Now as for it not working in IE7, it is because IE7 is more picky when it comes to CSS. This can be both good and bad, but to make a long story short, it is case-sensitive.

Code:
<td style="filter: alpha(opacity=75);">


That should work I believe.
AftershockVibe
IE and Mozilla (and Opera) both support transparency but use different CSS to implement it;

Code:
float:left;filter:alpha(opacity=25);
-moz-opacity:.25;
opacity:.25;"


First line is IE, second is Mozilla and Opera is third. IE is a percentage (0-100), Mozilla and Opera must be a decimal (0-1).

This should sort your problem Cool [/code]
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.