|
-
Jan 14th, 2003, 05:29 AM
#1
Thread Starter
Frenzied Member
CSS and tranparency
I have a CSS for my menu, I wish the background color to be #dedede, but I also want it to be transparent, how do I make that?
Code:
.menu
{
BORDER-RIGHT: buttonhighlight thin outset;
BORDER-TOP: buttonhighlight thin outset;
VISIBILITY: hidden;
BORDER-LEFT: buttonhighlight thin outset;
WIDTH: 150px;
LINE-HEIGHT: 140%;
BORDER-BOTTOM: buttonhighlight thin outset;
POSITION: absolute;
BACKGROUND-COLOR: transparent;
BACKGROUND: #dedede;
}
-
Jan 14th, 2003, 07:07 AM
#2
Frenzied Member
How do you mean? Like semi-transparency? There is no CSS for that yet (not sure if it's in CSS 3), the only thing to do is use one of IEs proprietary filters, and use -moz-opacity to take care of Mozilla, but then your CSS won't validate. THe other alternative is to use a PNG which support alpha transparency. But IE for Win doesn't support it for some reason (see my sig. ).
If that's not what you mean you'll have to be more specific.
-
Jan 14th, 2003, 07:09 AM
#3
Thread Starter
Frenzied Member
Hi Rick
I've found out, I used the code below.
Code:
.menu
{
BORDER-RIGHT: buttonhighlight thin outset;
BORDER-TOP: buttonhighlight thin outset;
VISIBILITY: hidden;
BORDER-LEFT: buttonhighlight thin outset;
WIDTH: 150px;
LINE-HEIGHT: 140%;
BORDER-BOTTOM: buttonhighlight thin outset;
POSITION: absolute;
BACKGROUND-COLOR: silver;
filter: alpha(opacity=85);
}
-
Jan 15th, 2003, 06:11 AM
#4
Frenzied Member
Yep, that's the MS proprietary stuff. You should also put -moz-opacity: 85% in there too so that it will work in Gecko based browsers.
-
Jan 16th, 2003, 06:55 AM
#5
Fanatic Member
yeah, Ricks right, filter: alpha(opacity=85); is an IE6 addition
-
Jan 16th, 2003, 07:34 AM
#6
Thread Starter
Frenzied Member
Is the Mozilla opacity
Code:
filter: moz(opacity=85);
-
Jan 17th, 2003, 10:03 AM
#7
Fanatic Member
no, it's
-moz-opacity: 85%
-
Jan 17th, 2003, 03:09 PM
#8
Frenzied Member
ALso there is a list of all the CSS moz supports at http://lxr.mozilla.org/seamonkey/sou...sCSSPropList.h - proprietary and standard
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|