seventheyejosh Posted October 9, 2009 Share Posted October 9, 2009 Is there anyway to do this? .page_row_hover{ opacity:0.2; color:#000000; } basically I want to make div's opacity alter, which it is doing, but keep the text black. Is this attainable without making another div to hold only the text? Quote Link to comment https://forums.phpfreaks.com/topic/177139-override-opacity/ Share on other sites More sharing options...
Daniel0 Posted October 10, 2009 Share Posted October 10, 2009 What do you mean with override? Quote Link to comment https://forums.phpfreaks.com/topic/177139-override-opacity/#findComment-934171 Share on other sites More sharing options...
dreamwest Posted October 10, 2009 Share Posted October 10, 2009 Yes. But you will need to style the <p> div.trans { width:400px; height:180px; margin:30px 50px; background-color:#ffffff; border:1px solid black; /* for IE */ filter:alpha(opacity=60); /* CSS3 standard */ opacity:0.6; } div.trans p { margin:30px 40px; font-weight:bold; color:#000000; } </style> </head> <body> <div class="trans"> <p>Hi im testing my opacity</p> </div> Quote Link to comment https://forums.phpfreaks.com/topic/177139-override-opacity/#findComment-934201 Share on other sites More sharing options...
haku Posted October 10, 2009 Share Posted October 10, 2009 The maximum opacity an element can have is the opacity of its parent(s). So if the containing element has a lowered opacity, then the text inside cannot be any more opaque than the container. Quote Link to comment https://forums.phpfreaks.com/topic/177139-override-opacity/#findComment-934458 Share on other sites More sharing options...
TheFilmGod Posted October 12, 2009 Share Posted October 12, 2009 Or you could use a quasi-transparent png? Quote Link to comment https://forums.phpfreaks.com/topic/177139-override-opacity/#findComment-935151 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.