HTML and CSS Reference
In-Depth Information
Border Width
Border Color
The border-width property controls
the width of the border. You can use
keywords or pixels to specify the width.
The border-color property sets the color
of the border. This works just like setting
font colors; you can use color names, rgb
values, or hex codes to specify color.
border-width: thin;
border-width: 5px;
border-color: red;
border-color: rgb(100%, 0%, 0%);
border-color: #ff0000;
You ca n specify w idths usin g the keyw ords thin,
medium , or thick , or by the number o f pixels.
1px
2px
3px
4px
5px
6px
thin
medium
thick
Specifying Border Sides
Just as with margins and padding,
you can specify border style, width,
or color on any side (top, right,
bottom, or left):
border-right-color
border-right-style
border-right-width
border-top-color
border-top-style
border-top-width
border-top-color: black;
border-top-style: dashed;
border-top-width: thick;
border-bottom-color
border-bottom-style
border-bottom-width
border-left-color
border-left-style
border-left-width
These properties are for the top border
only. You can specify eac h side of the
border independently.
Search WWH ::




Custom Search