CSS - column-rule-width Property



The CSS property column-rule-width sets the width of the line that is drawn between the columns in a multi-column layout.

Possible values

The CSS property column-rule-width is specified as a single <'border-width'> value:

  • <'border-width'>: Takes a keyword specified by border-width value that determines the width of the rule. The value can be either a <length> or one of the keywords thin, medium, or thick.

Note: column-rule-style property must be defined before column-rule-width.

Applies to

All the multicol elements.

Syntax

column-rule-width = <length> | thin| medium | thick

CSS column-rule-width - thick Value

In the following example the column-rule-width property is used to set the width of the rule using a keyword value:

<html>
<head>
<style> 
   .multicol-col-rule {
      column-count: 3;
      column-gap: 50px;
      column-rule-style: dotted;
      column-rule-width: thick;
   }

   p {
      background-color: bisque;
   }
</style>
</head>
<body>
   <h1>column-rule-width property (keyword)</h1>

   <div class="multicol-col-rule">
      <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
      <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.</p>
   </div>
</body>
</html>

CSS column-rule-width - length Value

In the following example the column-rule-width property is used to set the width of the rule using a length value:

<html>
<head>
<style> 
   .multicol-col-rule {
      column-count: 3;
      column-gap: 50px;
      column-rule-style: dotted;
      column-rule-width: 20px;
   }

   p {
      background-color: bisque;
   }
</style>
</head>
<body>
   <h1>column-rule-width property (length)</h1>

   <div class="multicol-col-rule">
      <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
      <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius.</p>
   </div>
</body>
</html>
Advertisements