Search results
People also ask
What is border color CSS?
What happens if border-color is not set?
What is border-left-color in CSS?
How to customize a border in CSS?
What is the syntax for the border-color property?
What is a border color property?
The border-color property is used to set the color of the four borders. The color can be set by: name - specify a color name, like "red". HEX - specify a HEX value, like "#ff0000". RGB - specify a RGB value, like "rgb (255,0,0)" HSL - specify a HSL value, like "hsl (0, 100%, 50%)" transparent.
- Border Sides
From the examples on the previous pages, you have seen that...
- CSS border-color property
The border-color property sets the color of an element's...
- Border Sides
- Overview
- Try it
- Constituent properties
- Syntax
- Browser compatibility
The border-color shorthand CSS property sets the color of an element's border.
Each side can be set individually using border-top-color, border-right-color, border-bottom-color, and border-left-color; or using the writing mode-aware border-block-start-color, border-block-end-color, border-inline-start-color, and border-inline-end-color.
You can find more information about border colors in CSS colors.
This property is a shorthand for the following CSS properties:
•border-bottom-color
•border-left-color
•border-right-color
The border-color property may be specified using one, two, three, or four values.
•When one value is specified, it applies the same color to all four sides.
•When two values are specified, the first color applies to the top and bottom, the second to the left and right.
•When three values are specified, the first color applies to the top, the second to the left and right, the third to the bottom.
BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
- no
Learn how to set the color of an element's four borders with the border-color property. See examples, syntax, values, browser support and related pages.
Learn how to use CSS border-color property to add color to the element's border. See syntax, examples, and shorthand methods for different sides of the border.
Jun 13, 2024 · CSS borders are used to define an element’s boundary, providing visual separation and structure to web content. Borders can be customized in terms of width, style, and color, allowing for a wide range of design possibilities. Common border styles include solid, dashed, dotted, and double.
border-color: sets the color of the border. border: shorthand property to specify border-style, border-width, and border color. border-radius: sets the radius of the border. border-image: allows to set an image as a border. We will look at each of them briefly. CSS border-style Property.
Jul 20, 2017 · The border-color CSS property is a shorthand for setting the color of the four sides of an element's border: border-top-color, border-right-color, border-bottom-color, border-left-color. /* border-color: color */ /* the color applies to all sides */ . border-color: red; /* border-color: top&bottom right&left */ border-color: red #f015ca;