Set the Color of the Rule Between Columns with CSS



To set the color between columns, use the column-rule-color property. You can try to run the following code to implement the column-rule-color property.

With that, we will also set the style of the column rule:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            column-count: 4;
            column-gap: 50px;
            column-rule-color: orange;
            column-rule-style: dashed;
         }
     </style>
   </head>
   <body>
      <div class = "demo">
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text. This is demo text.  
         This is demo text. This is demo text.
      </div>
   </body>
</html>
Updated on: 2020-06-24T13:25:20+05:30

106 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements