What Is The CSS Column-width Property?

ExploreEXPLORE THE CATALOGSupercharge your career with 700+ hands-on coursesView All CoursesPythonJavaJavaScriptCReactDockerVue JSRWeb DevDevOpsAWSC#LEARNING TOOLSExplore the industry's most complete learning platformCoursesLevel up your skillsSkill PathsAchieve learning goalsProjectsBuild real-world applicationsMock InterviewsNewAI-Powered interviewsPersonalized PathsGet the right resources for your goalsLEARN TO CODECheck out our beginner friendly courses.PricingFor BusinessResourcesNewsletterCurated insights on AI, Cloud & System DesignBlogFor developers, By developersFree CheatsheetsDownload handy guides for tech topicsAnswersTrusted answers to developer questionsGamesSharpen your skills with daily challengesSearchCoursesLog InJoin for freeWhat is the CSS column-width property?

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.

OutputHTMLCSS (SCSS)

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.

Relevant Answers

Explore Courses

Free Resources

License: Creative Commons-Attribution-ShareAlike 4.0 (CC-BY-SA 4.0)

Từ khóa » Html Css Column Width