I’m trying to make a div with a translucent background, but fully opaque contents. Here’s what I have:
#mydiv {
color: #FFFFFF;
width: 900px;
height: 140px;
border: 0px;
border-radius: 15px;
background: #000000;
opacity: .2;
margin: 0px 0px 10px 0px;
padding: 10px;
}
Is there a way to do this with CSS?
Try using this:
Here is some more information on
rgba().