How to set opacity to the background color of a div?

EnexoOnoma picture EnexoOnoma · Jul 8, 2011 · Viewed 115.1k times · Source

I have this class

.box { background-color:#fff; border:3px solid #eee; }

My question is how can I set an opacity to the white background only so that it will kinda mix with my background?

Thank you.

Answer

Kevin Brown picture Kevin Brown · Jul 8, 2011

I think rgba is the quickest and easiest!

background: rgba(225, 225, 225, .8)