CSS Transparecies (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Giomanach -> CSS Transparecies (1/21/2005 15:01:33)

Only me...

Anyone know of any CSS for transparencies that will work with Opera?

I've already tried the following:

color: rgba(0,0,255,0.5)


Source: http://www.webreference.com/programming/css_color/part2/index.html

opacity: .5;
	filter: alpha(opacity=50);


Source: http://www.quirksmode.org/css/opacity.html

-moz-opacity: .5;


And none work in Opera. Or do I have to go through the hassle of trying to make a translucent gif?

TIA

Dan




c1sissy -> RE: CSS Transparecies (1/21/2005 15:43:05)

Dan someone posted a link to opaque things with css, try a google search on this. I think it might be the same thing that you are trying for? Not sure, I have not worked with this yet, and I forget who posted the link to the site with the information.




Giomanach -> RE: CSS Transparecies (1/21/2005 17:41:35)

Deb - I've already googled, and it doesn't give me anything different....




c1sissy -> RE: CSS Transparecies (1/21/2005 17:51:48)

Sorry I can't help you on this one, In one of the courses they did go over opagnes sp? if I get time I'll look it up and see if there are any links for you to check into.




Suzy. -> RE: CSS Transparecies (1/23/2005 6:30:51)

Opera does not support it.. you're correct

It does however support variable opacity .pngs. Which you knew so the only thing I can suggest it to use one of them and then use a filter for IE inside a conditional comment ( or some other IE workaround ) to achieve the same effect for it.

See this link for more There is also a problem with links inside a div done this way with IE/Win but the problem can be solved by changing the size of the image, that article says, but when I tested it with the image from this page it didn't work for me in IE6 even with the 2x10 image.

However I changed the z-index of the links within a div and it then seemed to work fine. I didn't check different sized pngs so suggest if you use it you try both workarounds?

If you copy the 75p_white.png from that page {background of top two divs} works with this test code:

body {background: #000;}

.opaque {
width: 200px;
height: 100px;
border: 1px solid #ffcf00;
background: url(75p_white.png);
}

/* or put in a conditional comment */
* html .opaque {
background: transparent;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='75p_white.png');
}

.opaque a {position: relative; z-index: 100;}
a {color: #f00;}
a:hover {color: #00f; text-decoration: none;}


HTML: <div class="opaque"><a href="#">test link</a></div>

You probably saw all this too in your searching, but I thought I'd put it here just in case..




d a v e -> RE: CSS Transparecies (1/23/2005 8:53:55)

you can also use a 2px sqaure gif in a checked pattern alternating between 1 white square and 1 transparent (like a chess board) and use that as a background image for a div then lay that layer over another thing. gives the illusion of transparency




Giomanach -> RE: CSS Transparecies (1/23/2005 9:51:13)

quote:

ORIGINAL: Suzy.

Opera does not support it.. you're correct

It does however support variable opacity .pngs. Which you knew so the only thing I can suggest it to use one of them and then use a filter for IE inside a conditional comment ( or some other IE workaround ) to achieve the same effect for it.



See this link for more There is also a problem with links inside a div done this way with IE/Win but the problem can be solved by changing the size of the image, that article says, but when I tested it with the image from this page it didn't work for me in IE6 even with the 2x10 image.

However I changed the z-index of the links within a div and it then seemed to work fine. I didn't check different sized pngs so suggest if you use it you try both workarounds?

If you copy the 75p_white.png from that page {background of top two divs} works with this test code:

body {background: #000;}

.opaque {
width: 200px;
height: 100px;
border: 1px solid #ffcf00;
background: url(75p_white.png);
}

/* or put in a conditional comment */
* html .opaque {
background: transparent;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale src='75p_white.png');
}

.opaque a {position: relative; z-index: 100;}
a {color: #f00;}
a:hover {color: #00f; text-decoration: none;}


HTML: <div class="opaque"><a href="#">test link</a></div>

You probably saw all this too in your searching, but I thought I'd put it here just in case..

Thank You Claire

I didn't want to have to use a PNG for the trasparency for it, but looks like i have no other option.

For IE, I'll just use a conditional:

<link rel="stylesheet" href="mozzop.css" type="text/css" />
<!-->
<link rel="stylesheet" href="ie.css" type="text/css" />
<!-->

Just to alter the background so it kinda appears the same in all browsers.

Dave - Tried that, looks like a chessboard[:D]

Dan




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625