[jQuery] Re: Opacity for a menu background, but not for the element inside
You can use the CSS 'opacity' property. It accepts a value between 0.0 and 1.0. For example, if you wanted to set the opacity of an element to 40%, you would use: opacity: 0.4; However, in true MS style, you have to do something different to get it to work in IE. Internet Explorer accepts the 'filter' property. Do make the example above work in IE, you would use: filter: alpha(filter = 40) You can learn a little more about it here: http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/ Hope that helps. On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote: Hye, I would like to create a menu, with a 80% opacity background, but I want to keep the link element at 100% opacity. For example : lia href=link.htmllorem ipsum/a/li I would like to have the li element at 80%, but the a element at 100% (or 120%). I know that I could use PNG, but it would be great if I could do this with just a CSS Color and jQuery. Is there any solution ?
[jQuery] Re: Opacity for a menu background, but not for the element inside
Jim, read the question again ;) Anyway. There is no simple solution to this problem, I'd advise using a PNG image as it is the cleanest way to achieve this. Jim D wrote: You can use the CSS 'opacity' property. It accepts a value between 0.0 and 1.0. For example, if you wanted to set the opacity of an element to 40%, you would use: opacity: 0.4; However, in true MS style, you have to do something different to get it to work in IE. Internet Explorer accepts the 'filter' property. Do make the example above work in IE, you would use: filter: alpha(filter = 40) You can learn a little more about it here: http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-internet-explorer-ie/ Hope that helps. On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote: Hye, I would like to create a menu, with a 80% opacity background, but I want to keep the link element at 100% opacity. For example : lia href=link.htmllorem ipsum/a/li I would like to have the li element at 80%, but the a element at 100% (or 120%). I know that I could use PNG, but it would be great if I could do this with just a CSS Color and jQuery. Is there any solution ?
[jQuery] Re: Opacity for a menu background, but not for the element inside
This will be easier sometime around 2012 when RGBA and HSLA colors are widely supported :) On Dec 12, 1:22 pm, Liam Potter radioactiv...@gmail.com wrote: Jim, read the question again ;) Anyway. There is no simple solution to this problem, I'd advise using a PNG image as it is the cleanest way to achieve this. Jim D wrote: You can use the CSS 'opacity' property. It accepts a value between 0.0 and 1.0. For example, if you wanted to set the opacity of an element to 40%, you would use: opacity: 0.4; However, in true MS style, you have to do something different to get it to work in IE. Internet Explorer accepts the 'filter' property. Do make the example above work in IE, you would use: filter: alpha(filter = 40) You can learn a little more about it here: http://joseph.randomnetworks.com/archives/2006/08/16/css-opacity-in-i... Hope that helps. On Dec 12, 6:10 am, Cyril G magiccy...@gmail.com wrote: Hye, I would like to create a menu, with a 80% opacity background, but I want to keep the link element at 100% opacity. For example : lia href=link.htmllorem ipsum/a/li I would like to have the li element at 80%, but the a element at 100% (or 120%). I know that I could use PNG, but it would be great if I could do this with just a CSS Color and jQuery. Is there any solution ?