tags:

views:

39

answers:

2

Is it possible with just CSS to have a white background color and then have 50% transparncy with:

.transparent_class { filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5; }

and still have a solid white border?

+5  A: 

opacity applies to the whole element. You can wrap the initial element with a parent element and put a border, or you can use rgba and apply your opacity to the background specifically, instead of the entire element.

http://css-tricks.com/rgba-browser-support/

meder
+3  A: 
.transparent_class { background-color: rgba(255,255,255,0.5); border: 1px solid #FFF; }
Vaibhav Gupta