bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/CSS/Advanced Styling
CSS•Advanced Styling

CSS Column Rules

This page covers CSS column rules, span, and width properties.

CSS Column Rule

The CSS column-rule-style property specifies the style of the vertical rule between columns:

Example

Formatted code
div {
  column-rule-style: solid;
}

Live preview

The CSS column-rule-width property specifies the width of the vertical rule between columns:

Example

Formatted code
div {
  column-rule-width: 1px;
}

Live preview

The CSS column-rule-color property specifies the color of the vertical rule between columns:

Example

Formatted code
div {
  column-rule-color: lightblue;
}

Live preview

The CSS column-rule property is a shorthand property for setting all the column-rule-* properties above.

Example

Formatted code
div {
  column-rule: 1px solid lightblue;
}

Live preview

CSS Column Span

The CSS column-span property specifies how many columns an element (typically a heading) should span across.

Example

Formatted code
h2 {
  column-span: all;
  text-align: center;
}

Live preview

CSS Column Width

The CSS column-width property specifies a suggested, optimal width for each column.

Here, the browser will determine the number of columns based on this width and the available space.

Example

Formatted code
div {
  column-width: 100px;
}

Live preview

CSS Multi-columns Properties

The following table lists all the multi-columns properties:

PropertyDescription
column-countSpecifies the number of columns an element should be divided into
column-fillSpecifies how to fill columns
column-gapSpecifies the gap between the columns
column-ruleA shorthand property for setting all the column-rule-* properties
column-rule-colorSpecifies the color of the rule between columns
column-rule-styleSpecifies the style of the rule between columns
column-rule-widthSpecifies the width of the rule between columns
column-spanSpecifies how many columns an element should span across
column-widthSpecifies a suggested, optimal width for the columns
columnsA shorthand property for setting column-width and column-count

Previous

CSS Multiple Columns

Next

CSS User Interface

This chapter

Overview
53

Lessons

154m

Read time

1. CSS Rounded Corners2. Sass Tutorial3. CSS Border Images4. CSS Multiple Backgrounds5. CSS Background Size6. CSS Background Origin7. CSS Background Clip8. CSS Colors9. CSS Color Keywords10. CSS Gradients11. CSS Radial Gradients12. CSS Conic Gradients13. CSS Shadow Effects14. CSS Box Shadow15. CSS Text Effects16. CSS Custom Fonts17. CSS 2D Transforms18. CSS 2D Transform Scale19. CSS 2D Transform Skew / Matrix20. CSS 3D Transforms21. CSS Transitions22. CSS Transition Timing23. CSS Animations24. CSS Animation Timing25. CSS Animation Properties26. CSS Tooltip27. CSS Tooltip Arrows28. CSS Styling Images29. CSS Image Effects30. CSS Image Hover Overlays31. CSS Responsive Modal Images32. CSS Centering Images33. CSS Image Filter Effects34. CSS Image Shapes35. CSS object-fit Property36. CSS object-position Property37. CSS Masking38. CSS Gradient Mask Layers39. CSS SVG Mask Layers40. CSS Styling Buttons41. CSS Button Hover Effects42. CSS Button Groups43. CSS Pagination Styles44. CSS Multiple Columns45. CSS Column Rules46. CSS User Interface47. CSS Variables - var() Function48. CSS Overriding Variables49. CSS Variables and JavaScript50. CSS Variables in Media Queries51. CSS @property Rule52. CSS Box Sizing53. CSS Media Queries

On this page

CSS Column RuleCSS Column SpanCSS Column WidthCSS Multi-columns Properties