Name
border-bottom, border-left, border-right, border-top — NN n/a IE 4 CSS 1
Synopsis
Inherited: No
All four attributes are shorthand attributes for setting the width, style, and/or color of a single border edge of an element in one assignment statement. Whichever attributes you don’t explicitly set with this attribute assume their initial values.
CSS Syntax
border-bottom:border-bottom-width||border-bottom-style||colorborder-left:border-left-width||border-left-style||colorborder-right:border-right-width||border-right-style||colorborder-top:border-top-width||border-top-style||color
Value
For the width and style attribute values, see the
border-bottom-width and
border-bottom-style attributes in this chapter.
For details on the color value, see the
section about colors at the beginning of this chapter.
Initial Value
None.
Example
P {border-bottom: solid lightgreen 3px}
P {border-left: solid lightgreen 6px}
P {border-right: solid lightgreen 3px}
P {border-top: solid lightgreen 6px}Applies To
All elements (CSS); block and replaced elements (IE).
Object Model Reference
- IE
[window.]document.all.elementID.style.borderBottom[window.]document.all.elementID.style.borderLeft[window.]document.all.elementID.style.borderRight[window.]document.all.elementID.style.borderTop
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access