Is there a straight forward CSS way to make the border of an element semi-transparent with something like :
border-opacity:0.7;
?
If not, does anyone have an idea how I could do so without using images?
Is there a straight forward CSS way to make the border of an element semi-transparent with something like :
border-opacity:0.7;
?
If not, does anyone have an idea how I could do so without using images?
As an alternate solution that may work in some cases: change the
border-style
todotted
.Having alternating groups of pixels between the foreground color and the background color isn't the same as a continuous line of partially transparent pixels. On the other hand, this requires significantly less CSS and it is much more compatible across every browser without any browser-specific directives.
Other answers deal with the technical aspect of the border-opacity issue, while I'd like to present a hack(pure CSS and HTML only). Basically create a container div, having a border div and then the content div.
And then the CSS:(set content border to none, take care of positioning such that border thickness is accounted for)