Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css
community creator
html

What is the CSS column-width property?

Behzad Ahmad

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The column-width property in CSSCascade Style Sheets is used to define the width of the column when we are using a multi-column layout.


We can also use the column property to set the column count and width only once.


Syntax


column-width: auto|length|initial|inherit;

Property values

  • auto: It is the default value. The width of the column is specified by the browser automatically.

  • length: It is used to define the width of the column.

  • initial: This sets the value to its default value.

  • inherit: This inherits property from its parent value.

Code

The following is the basic HTMLHyperText Markup Language & CSS code to demonstrate the use of the column-width property.

Explanation

In this example, we can see that we have set the width between the columns as 200px.

We can also set the width according to our choice.

RELATED TAGS

css
community creator
html

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring