Jump to content

background transparent


divinedesigns1
 Share

Recommended Posts

hello, i am having a little problem, is there a way to make the background transparent but not the text? i know how to make the background transparent but the text gets transparented also "the text gets transparent also <-- doesnt make sense to me, but i hope you get what im saying" anyway how do i avoid making the text transparent but end up making the background transparent only?

I am just testing my knowledge hehehe
Link to comment
Share on other sites

??? apply transparent background, background-color: transparent; remove background color or image ie ALL background: none; EDIT: if you are using opacity, and IE crappy filter blah blah, IT and ALL its child elements become transparent also;

Edited by dsonesuk
Link to comment
Share on other sites

ok i think i explained that wrong hehehe, i did

background:#976548;filter:alpha(opacity=20);

but the text opacity went to 20 also 0.o i just wanted the background to change the opacity

Link to comment
Share on other sites

Give the container on which you want to use opacity a position: relative;, within that create EMPTY div and and give id ref "trans_bg"

#trans_bg{position: absolute;left:0;top:0;right:0;bottom:0background:#976548;opacity:0.20;filter:alpha(opacity=20);}

you may need to apply z-index: to force this below text.

Link to comment
Share on other sites

hello, i am having a little problem, is there a way to make the background transparent but not the text? i know how to make the background transparent but the text gets transparented also "the text gets transparent also <-- doesnt make sense to me, but i hope you get what im saying" anyway how do i avoid making the text transparent but end up making the background transparent only?
You could use rgba
background: rgba(0,0,0,0.5);

Link to comment
Share on other sites

I don't like creating extra elements for styling if I can avoid it. You can make a 1x1 pixel semi-transparent PNG as a background image if you want to support browsers that don't accept rgba format.

Link to comment
Share on other sites

Personally I don't like creating unnecessary bg images, when background-color: with opacity, works just fine! Also works in ALL browsers AND also where i can change transparent colour instantly without the need for creating a new image everytime! But! its just my preference.

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...