The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Opacity on a , but not on the inside of it. How do I do that?
Hello out there!
I am really struggling atm. In my head it should be a very simple thing to do.
But now, I am unsure.. is it even possible?
I want to make some transparent “cards” /divs, with text on top, and NOT making the text transparent too.
Would it help to make an Id? .. i guess not, the <p>‘s are still inside that div.. hmm.
It’s very difficult to diagnose a description. We need code.
Try mocking up a reduced demo in CodePen to show us what problems you’re having.
Don’t use opacity…it makes the element and all it’s contents transparent.
If you want the “transparent” look to the background, then use a background color with an alpha (opacity) value such as RGBA or HSLA
See – https://stackoverflow.com/questions/806000/how-do-i-give-text-or-an-image-a-transparent-background-using-css
Paulie_D thank you so much!
It is exactly what i was looking for :)