Jump to content

how opacity besides the font?


divinedesigns1
 Share

Recommended Posts

i have a few divs which is transparent but the text also becomes transparent, how can i undo this or make it just so the div can be transparent and not the font also

background-image: -ms-linear-gradient(top, #F9FF4F 5%, #EFE703 100%);	background-image: -moz-linear-gradient(top, #F9FF4F 5%, #EFE703 100%);	background-image: -o-linear-gradient(top, #F9FF4F 5%, #EFE703 100%);	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #F9FF4F), color-stop(1, #EFE703));	background-image: -webkit-linear-gradient(top, #F9FF4F 5%, #EFE703 100%);	background-image: linear-gradient(to bottom, #F9FF4F 5%, #EFE703 100%);	opacity:0.6;	filter:alpha(opacity=60);

the above code is what im using, but this is making the text also transparent.

Link to comment
Share on other sites

The opacity property makes the entire element transparent, as a result the text inside it also has opacity. If you just want the background transparent rather than the element itself you can use rgba() color codes. http://www.w3schools.com/cssref/css_colors_legal.asp

Link to comment
Share on other sites

The opacity property makes the entire element transparent, as a result the text inside it also has opacity. If you just want the background transparent rather than the element itself you can use rgba() color codes. http://www.w3schools.com/cssref/css_colors_legal.asp

Thanks Ingolme, that work perfect

Link to comment
Share on other sites

The opacity property makes the entire element transparent, as a result the text inside it also has opacity. If you just want the background transparent rather than the element itself you can use rgba() color codes. http://www.w3schools.com/cssref/css_colors_legal.asp

 

You could use

<div style="opacity: 0.3;">Opacity Bit here <div style="opacity: 1;">Normal</div></div> should work, i think.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...