Reputation: 4148
I have a form inside a div with a transparent color. I'd need to have the input texts plain white (non transparent). How can I do it?
Here's some code:
(don't mind the background, it's just a random image I picked for the example)
Thanks
Upvotes: 2
Views: 2156
Reputation: 46
If you use:
opacity: .7
of a div, his sons take the same property.
You can solve using rgba (255,255,255, .7)
Upvotes: 1
Reputation: 92803
@carlo; may be you have to use use css3 rgba
color for your background transparency which is not effect div child elements.
background: rgba(0,0,0,0.3)
for IE use filter
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000); /* IE 6 & 7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000)"; /* IE8 */
you can generate your rgba filter from here http://kimili.com/journal/rgba-hsla-css-generator-for-internet-explorer/
Upvotes: 2