HTML and CSS Reference
The border shorthand property resets omitted values to their defaults.
Setting a Fallback Border Color for Alpha Transparency
As noted earlier, IE 6-8 don't support the rgba() , hsl() , or hsla() color formats. For cross-browser
compatibility, it's best to avoid hsl() altogether when setting border colors. But if you want to use alpha
transparency in a border, you can set an opaque fallback color first followed by a shorthand property that uses
rgba() or hsla() . For example, border_alpha.html contains a <div> that's styled like this:
padding: 5px 10px;
background: rgba(255,255,255, 0.9);
border: 15px solid;
As Figure 9-4 shows, a browser that understands rgba() uses the second border-color declaration, allowing
the background image to show through. Note also that background-clip has been set to padding-box . This is
necessary to prevent the background color from extending under the border.
Figure 9-4. The background image is visible through the translucent border