2

I am trying to search for a CSS style to adjust the transparency of a border it doesn't mean that I can't see the border but what I want is to adjust its transparency.

There is a case in stackoverflow about this but it is eliminating the border and what i want is just to reduce its transparency so its clearly a different case

  • 1
    apply color in rgba instead of hexadecimal value. – Mr_Green Jun 04 '15 at 08:04
  • 1
    Why could you not use google for this question? Or just use the search function of this site. – Ruddy Jun 04 '15 at 08:06
  • I search but I see only transparent and border is not seen but I am seeking for the css to remain the border with less transparency sorry if I cant find answer from web but what I want is the answer below –  Jun 04 '15 at 08:12
  • the transparency you give is eliminating the border not adjusting its transparency –  Jun 04 '15 at 08:13

1 Answers1

4

best way to make border transparent is by using RGBA

div {
    border: 1px solid rgba(255, 0, 0, .5);
    -webkit-background-clip: padding-box; /* for Safari */
    background-clip: padding-box; /* for IE9+, Firefox 4+, Opera, Chrome */
}
Vineeta Mehta
  • 458
  • 1
  • 4
  • 10