Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 05-29-2007, 04:01 PM IE opacity
Skilled Talker

Posts: 50
Location: Finland
Trades: 0
Hello guys! I finally figured out how to apply tansparency in both IE and Firefox, but now I have another problem. I applied transparency to my background image, but the text is now transparent as well. Is there a way to apply the transparency to only background image, not the text?

Here's my CSS:
Code:
.navbar {
float: left;
width: 780px;
height: 30px;
background: url(images/bg.png) repeat;}

* html .navbar { 
display: block; 
background: url(images/bg.gif) repeat;
opacity: 0.5; 
-moz-opacity: 0.5; 
filter: alpha(opacity=50);} 

.menu * {
padding: 0;
margin: 0;}

.menu {
width: 780px;
padding: 0;
margin: 0;}

.menu li {
float: left;
display: inline;
padding-left: 10px;
list-style: none;}

.menu li a {
float: left;
display: inline;
font: bold 9pt Verdana, arial;
padding: 8px 0;
width: 100px;
text-decoration: none;
text-transform: uppercase;
color: #FFFFFF;}

* html .menu li a {
opacity: 1; 
-moz-opacity: 1;
filter: alpha(opacity=100);}

.menu li a:hover {
text-decoration: underline;
color: #DBDFEB;}
I added

opacity: 1;
-moz-opacity: 1;
filter: alpha(opacity=100);

to the links, but they're still half transparent.

Anyone has any ideas?

Thanks!
Catie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-29-2007, 04:15 PM Re: IE opacity
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Opacity is not an option for the background image properties. What you need is to create the opacity in the PNG first, then use it. You're still going to need a workaround because IE 6 and below do not support PNG transparency and even with the available filters for IE, you cannot use transparency on a tiled image.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-29-2007, 04:18 PM Re: IE opacity
Skilled Talker

Posts: 50
Location: Finland
Trades: 0
Thanks for your reply, but I don't quite understand what you mean. Could you please show me an example?

I mean the background works just fine in IE, but it makes the links transparent too. Is there a way to fix that?

Thanks
Catie is offline
Reply With Quote
View Public Profile
 
Old 05-29-2007, 04:22 PM Re: IE opacity
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Everything is semi-transparent because you put the opacity filter on * html, so it applies it to EVERYTHING.

Do you have a URL so we can see it ?
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-29-2007, 04:30 PM Re: IE opacity
Skilled Talker

Posts: 50
Location: Finland
Trades: 0
No sorry it's not online yet.
Catie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to IE opacity
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.83782 seconds with 12 queries