0

As kind a newbie I have a simple question. Having a textfield with background-color and border I want to give opacity value only to the background and not to the border:

#textfield {
background-color:#2875DE;
border:2px solid #2cb823;
}
#textfield.background-color {
filter:alpha(opacity=60);
}

This obviously won't work and any ideas of making the textfield with oval shape with opacity only for the background will be much appreciated.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by $urya
0

Well, I'm not very good with CSS either, but what I've always done is use a 1 pixel PNG image as the background whenever I need to use opacity. I know there's better ways, but it's always worked fine for me.

0

Hi there,

Check this code:

#textfield {
  width:400px;
  height:180px;
  margin:30px 50px;
  background-color:blue;
  border:2px solid #2cb823;
  /* for IE */
  filter:alpha(opacity=60);
  /* CSS3 standard */
  opacity:0.6;
}

It might help you.

Regards
Surya

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.