CSS column-rule property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
It is a short hand property of border-rule-width, border-rule-style, and border-rule-color properties.
Syntax
column-rule : column-rule-width column-rule-style column-rule-color
Property values
column-rule-width
mediumDefault
-
medium value represents medium sized border for the top side. thin<medium<thick
- Try it
column-rule-width: medium; length
-
lenght defines the line width of border for the top side. The used units might be px, in, em, pt.
- Try it
column-rule-width: 10px;
column-rule-style
noneDefault
-
There is no style. In this case, the color and width of border are also ignored i.e. 0px border.
- Try it
column-rule-style: none; hidden
-
It is same as 'none' but resolve to different results for the border-collapse property in tables.
- Try it
column-rule-style: hidden; dashed
-
The right border consists of a series of square shaped dashes.
- Try it
column-rule-style: dashed; double
-
The right border consists of two lines. The total border-width equals to the two lines and space between them.
- Try it
column-rule-style: double; ridge
-
The content seems to be coming out of the canvas. The half outer side of border is darker than border-block-end-color.
- Try it
column-rule-style: ridge; groove
-
The content seems to be going into the canvas. The half inner side of border is darker than border-block-end-color.
- Try it
column-rule-style: groove; inset
-
The color of any two sides is darker than border-block-end-color. It can be observed only when all the sides are visible.
- Try it
column-rule-style: inset; outset
-
The color of any two sides is darker than border-block-end-color. It can be observed only when all the sides are visible
- Try it
column-rule-style: outset;
column-rule-color
currentColorDefault
-
currentColor keyword represents the same color for the border as of text color.
- Try it
column-rule-color: currentColor; color-name
-
The following demo represents skyblue color for border.
- Try it
column-rule-color: skyblue; rgb value
-
It represents rgb value of a color. The hexadecimal value of red color for the border is given below.
- Try it
column-rule-color: rgb(255,0,0); hexadecimal value
-
It represents hexadecimal notation of red color. The hexadecimal notation of blue color for the border is given below.
- Try it
column-rule-color: #0000ff;
Applicable to
It applies to multi-column container.