Is either a non-negative explicit <length> value or a keyword denoting the thickness of the bottom border. The keyword must be one of the following values:
A thin border
A medium border
A thick border
The specification doesn't precisely define the thickness of each of the keywords, which is therefore implementation specific. Nevertheless, it requests that the thickness does follow the thin ≤ medium ≤ thick inequality and that the values are constant on a single document.
Is a keyword indicating that all four values are inherited from their parent's element calculated value.
border: ridge #ccc;
border-width: 6px; /* same as "border: ridge #ccc 6px"; 6px wide border on all 4 sides */
border: solid red;
border-width: 2px 10px; /* 2px wide top and bottom border, 10px right and left border */
border: dotted orange;
border-width: 0.3em 0; /* 0.3em wide top and bottom border, no border right and left */
border: solid lightgreen;
border-width: medium 0 1px thick; /* three different width, no right border */
Thanks! Please check your inbox to confirm your subscription.
If you haven’t previously confirmed a subscription to a Mozilla-related newsletter you may have to do so. Please check your inbox or your spam filter for an email from us.
Why does MDN look different?
MDN is changing to focus just on documenting web technologies. All the same great content is still here; we’re just changing some visual elements and navigation, to help you more quickly find the web technology docs you’re looking for.
But don’t worry, MDN and Mozilla are still together! In fact, we're updating MDN’s look to reflect Mozilla's new logo and colors.