
- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursors
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS Advanced
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Media Types
- CSS - Paged Media
- CSS - Aural Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS3 - Rounded Corner
- CSS3 - Border Images
- CSS3 - Multi Background
- CSS3 - Color
- CSS3 - Gradients
- CSS3 - Shadow
- CSS3 - Text
- CSS3 - Web font
- CSS3 - 2d transform
- CSS3 - 3d transform
- CSS3 - Animation
- CSS3 - Multi columns
- CSS3 - User Interface
- CSS3 - Box Sizing
- CSS Responsive
- CSS - Responsive Web Design
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
Setting Column Rules in CSS3
To set column rules, use the shorthand column-rule property, which allows you to set the following properties −
column-rule-width: set the width of the rule between columns column-rule-style: set the style of the rule between columns column-rule-color: set the rule of the rule between columns
The value for column rules can be set as −
column-rule: column-rule-width column-rule-style column-rule-color|initial|inherit;
Example
Let us now see another example −
<!DOCTYPE html> <html> <head> <style> .demo { column-count: 5; -webkit-column-count: 5; /* Chrome, Safari, Opera */ -moz-column-count: 5; /* Firefox */ -webkit-column-gap: normal; /* Chrome, Safari, Opera */ -moz-column-gap: normal; /* Firefox */ column-gap: normal; -webkit-column-rule: 5px dotted orange; /* Chrome, Safari, Opera */ -moz-column-rule: 5px dotted orange; /* Firefox */ column-rule: 5px dotted orange; } </style> </head> <body> <h1>PyTorch</h1> <div class="demo"> PyTorch is defined as an open source machine learning library for Python. It is used for applications such as natural language processing. It is initially developed by Facebook artificial-intelligence research group, and Uber’s Pyro software for probabilistic programming which is built on it. Originally, PyTorch was developed by Hugh Perkins as a Python wrapper for the LusJIT based on Torch framework. There are two PyTorch variants. PyTorch redesigns and implements Torch in Python while sharing the same core C libraries for the backend code. PyTorch developers tuned this back-end code to run Python efficiently. They also kept the GPU based hardware acceleration as well as the extensibility features that made Lua-based Torch. </div> </body> </html>
Output
Example
Let us see an example wherein we are using all the properties used above as shorthand property column-rule −
<!DOCTYPE html> <html> <head> <style> .demo { column-count: 4; -webkit-column-count: 4; /* Chrome, Safari, Opera */ -moz-column-count: 4; /* Firefox */ -webkit-column-gap: normal; /* Chrome, Safari, Opera */ -moz-column-gap: normal; /* Firefox */ column-gap: normal; -webkit-column-rule-width: 5px; /* Chrome, Safari, Opera */ -moz-column-rule-width: 5px; /* Firefox */ column-rule-width: 5px; -webkit-column-rule-color: blue; /* Chrome, Safari, Opera */ -moz-column-rule-color: blue; /* Firefox */ column-rule-color: blue; -webkit-column-rule-style: double; /* Chrome, Safari, Opera */ -moz-column-rule-style: double; /* Firefox */ column-rule-style: double; } </style> </head> <body> <h1>PyTorch</h1> <div class="demo"> PyTorch is defined as an open source machine learning library for Python. It is used for applications such as natural language processing. It is initially developed by Facebook artificial-intelligence research group, and Uber’s Pyro software for probabilistic programming which is built on it. Originally, PyTorch was developed by Hugh Perkins as a Python wrapper for the LusJIT based on Torch framework. There are two PyTorch variants. PyTorch redesigns and implements Torch in Python while sharing the same core C libraries for the backend code. PyTorch developers tuned this back-end code to run Python efficiently. They also kept the GPU based hardware acceleration as well as the extensibility features that made Lua-based Torch. </div> </body> </html>
Output
- Related Articles
- Setting Column Gap using CSS3
- Setting Column Count or Width using CSS3
- Setting the Image Brightness using CSS3
- Specify Word Breaking Rules using CSS3
- CSS3 Multi-Column column-count Property
- CSS3 Multi-Column column-rule Property
- CSS3 Multi-Column column-fill Property
- CSS3 Multi-Column column-gap Property
- CSS3 Multi-Column column-span Property
- CSS3 Multi-Column Property
- Setting column values as column names in the MySQL query result?
- CSS3 Multi-Column rule-width Property
- CSS3 Multi-Column rule-style Property
- CSS3 Multi-Column rule-color Property
- Setting similar value for a column in a MySQL table?

Advertisements