Monday, October 4, 2010

Css Tutorial : border-color

Remember that, unless you declare the color for the border, it will inherit color from the
element or parent element. As there is only one property for color (border-color), multiple
colors must be declared using shorthand:
/* Container for centering all our content */
#container {
width: 400px;
margin: 10px auto 10px auto;
padding: 20px;
border-style: dashed dotted solid ridge;
border-top-width: thin;
border-right-width: 20px;
border-bottom-width: medium;
border-left-width: thick;
border-color: #000 #999 #333 #CCC;
}
which gives us borders from black (top) to lightest gray (left)

No comments:

Post a Comment