Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
border
border-bottom
border-bottom-width
border-left
border-left-width
border-right
border-right-width
border-style
border-top
border-top-width
border-width
PROPERTY: border-color
border-color
:
color
Compatibility:
IE4+ N6
Version:
Level 1
Inherited:
No
The
border-color
property allows you to set the color of the border.
You can declare one, two, three or four colors:
If you declare one color, all four borders will be that color.
If you declare two colors, the top and bottom borders will be the first color, the right and left borders will be the second color.
If you declare three colors, the top border will be the first, the right border the second, and the bottom and left borders the third color.
If you declare four colors, the order is top, right, bottom, left.
color
The
color
value can be the keyword color name, the hex six-digit number (#FFFFFF), or the RGB three-digit value (255,255,255). There are sixteen standard colors in HTML:
aqua
#00FFFF
rgb(0,255,255)
gray
#808080
rgb(128,128,128)
silver
#C0C0C0
rgb(192,192,192)
navy
#000080
rgb(0,0,128)
black
#000000
rgb(0,0,0)
green
#800000
rgb(0,128,0)
teal
#008080
rgb(0,128,128)
olive
#808000
rgb(128,128,0)
blue
#0000FF
rgb(0,0,255)
lime
#00FF00
rgb(0,255,0)
white
#FFFFFF
rgb(255,255,255)
purple
#800080
rgb(128,0,128)
fuchsia
#FF00FF
rgb(255,0,255)
maroon
#800000
rgb(128,0,0)
yellow
#FFFF00
rgb(255,255,0)
red
#FF0000
rgb(255,0,0)
The
Guru
has also created a
Color Chart
that displays all of the named HTML colors. In addition the hexidecimal code is provided for 256 colors.
Code:
body { border-color: RGB(201, 94, 177); }
body { border-color: #E95A2B; }
body { border-color: silver; }
body { border-color: silver ;red; }
body { border-color: silver red RGB(223, 94, 77); }
body { border-color: silver red RGB(223, 94, 77) black; }
or
p.bordr
{
border-color: red red red red;
border-style: solid solid solid solid;
border-width: 30px 30px 30px 30px;
}
...
<p class="bordr">
DevGuru is great!
</p>
Output:
DevGuru is great!
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information