Shorthand Property to Set Columns with CSS



Use the columns property to set columns with CSS. You can try to run the following code to implement the columns property:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         .demo {
            column-rule-color: gray;
            columns: 100px 4;
            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.
      </div>
   </body>
</html>
Updated on: 2020-06-24T14:05:09+05:30

138 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements