CSS Border-width Properties Using tutorial

Source: Internet
Author: User
Border-width--Defines the width of the four borders: <border-width>{1,4} | Inherit <border-width>{1,4}: Border width (can have one, two, three or four values) inherit: Inherit initial value: Medium Inheritance: No applies to: all elements border: border, Width: breadth. Border-width Value Thin:border-width--Defines the width of four borders
Value: <border-width>{1,4} | Inherit
<border-width>{1,4}: Border width (can have one, two, three or four values)
Inherit: Inheritance
Initial value: Medium
Inheritance: No
Applies to: all elements
Border: Border, Width: wide.
Value of Border-width
Thin: Fine
Medium: Medium
Thick: Coarse
<length>: Length notation
The above width value has the following relationship: Thin<medium<thick

Tip: Border-width cannot use percentages and cannot take negative values, only lengths are used. (ex: PX,EM, etc.)!

Example
Specify four values for Border-width
Border-width:border-top-width border-right-width border-bottom-width border-left-width;
P#fourborders
{
Border-width:thick medium Thin 12px;
}
If you define four values, then these four values are top, right, bottom, and left border widths (starting at the top and traversing in clockwise order).

Equivalent to the following definition

P#fourborders
{
Border-top-width:thick;
Border-right-width:medium;
Border-bottom-width:thin;
border-left-width:12px;
}
Specify three values for Border-width
Border-width:border-top-width Border-right-width/border-left-width border-bottom-width;
P#threeborders
{
Border-width:thick 12px Thin;
}
If you define only three values, the median value represents the width of the left and right borders.

Equivalent to the following definition

P#threeborders
{
Border-top-width:thick;
border-right-width:12px;
Border-bottom-width:thin;
border-left-width:12px;
}
Specify two values for Border-width
Border-width:border-top-width/border-bottom-width Border-right-width/border-left-width;
P#twoborders
{
Border-width:thick 12px;
}
If you define only two values, the preceding values represent the upper and lower border widths, and the values that follow represent the width of the left and right borders.

Equivalent to the following definition

P#twoborders
{
Border-top-width:thick;
border-right-width:12px;
Border-bottom-width:thick;
border-left-width:12px;
}
Specify a value for Border-width
Border-width:border-top-width/border-bottom-width/border-right-width/border-left-width;
P#oneborders
{
Border-width:thick;
}
If you define only one value, this value represents the width of the four edges.

Equivalent to the following definition

P#oneborders
{
Border-top-width:thick;
Border-right-width:thick;
Border-bottom-width:thick;
Border-left-width:thick;
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.