Movatterモバイル変換


[0]ホーム

URL:


Menu
×
See More 
Sign In
+1 Get Certified Upgrade For Teachers Spaces Get Certified Upgrade For Teachers Spaces
   ❮     
     ❯   

CSS Tutorial

CSS HOMECSS IntroductionCSS SyntaxCSS SelectorsCSS How ToCSS CommentsCSS ErrorsCSS ColorsCSS BackgroundsCSS BordersCSS MarginsCSS PaddingCSS Height/WidthCSS Box ModelCSS OutlineCSS TextCSS FontsCSS IconsCSS LinksCSS ListsCSS TablesCSS DisplayCSS Max-widthCSS PositionCSS Z-indexCSS OverflowCSS FloatCSS Inline-blockCSS AlignCSS CombinatorsCSS Pseudo-classesCSS Pseudo-elementsCSS OpacityCSS Navigation BarsCSS DropdownsCSS Image GalleryCSS Image SpritesCSS Attr SelectorsCSS FormsCSS CountersCSS UnitsCSS InheritanceCSS SpecificityCSS !importantCSS Math FunctionsCSS OptimizationCSS AccessibilityCSS Website Layout

CSS Advanced

CSS Rounded CornersCSS Border ImagesCSS BackgroundsCSS ColorsCSS Color KeywordsCSS GradientsCSS ShadowsCSS Text EffectsCSS Custom FontsCSS 2D TransformsCSS 3D TransformsCSS TransitionsCSS AnimationsCSS TooltipsCSS Image StylingCSS Image ModalCSS Image CenteringCSS Image FiltersCSS Image ShapesCSS object-fitCSS object-positionCSS MaskingCSS ButtonsCSS PaginationCSS Multiple ColumnsCSS User InterfaceCSS VariablesCSS @propertyCSS Box SizingCSS Media QueriesCSS MQ Examples

CSS Flexbox

Flexbox IntroFlex ContainerFlex ItemsFlex Responsive

CSS Grid

Grid IntroGrid ContainerGrid ItemsGrid 12-column LayoutCSS @supports

CSS Responsive

RWD IntroRWD ViewportRWD Grid ViewRWD Media QueriesRWD ImagesRWD VideosRWD FrameworksRWD Templates

CSS SASS

SASS Tutorial

CSS Examples

CSS TemplatesCSS ExamplesCSS EditorCSS SnippetsCSS QuizCSS ExercisesCSS WebsiteCSS SyllabusCSS Study PlanCSS Interview PrepCSS BootcampCSS Certificate

CSS References

CSS ReferenceCSS SelectorsCSS CombinatorsCSS Pseudo-classesCSS Pseudo-elementsCSS At-rulesCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Browser Support

CSSMultiple Columns


CSS Multi-column Layout

The CSS Multi-column Layout Module allows easy definition of multiple columns of text - just like in newspapers:

Multi Column

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreetdolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipitlobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velitesse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissimqui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum solutanobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.

CSS Multi-column Properties

In this chapter you will learn about the following multi-column properties:

  • column-count
  • column-gap
  • column-rule-style
  • column-rule-width
  • column-rule-color
  • column-rule
  • column-span
  • column-width

CSS Create Multiple Columns

The CSScolumn-count property specifies the number of columns an element should be divided into.

Example

Divide the text in the <div> element into 3 columns:

div{
  column-count: 3;
}
Try it Yourself »


CSS Column Gap

The CSScolumn-gap property specifies the space between the columns.

Example

Specify a 40 pixels gap between the columns:

div{
  column-gap: 40px;
}
Try it Yourself »

CSS Column Rule

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

Example

div{
  column-rule-style: solid;
}
Try it Yourself »

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

Example

div{
  column-rule-width: 1px;
}
Try it Yourself »

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

Example

div{
  column-rule-color: lightblue;
}
Try it Yourself »

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

Example

Sets the width, style, and color of the vertical rule between columns:

div{
  column-rule: 1px solid lightblue;
}
Try it Yourself »

CSS Column Span

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

Example

Specify that the <h2> element should span across all columns (and be aligned in center):

h2 {
  column-span: all;
  text-align: center;
}
Try it Yourself »

CSS Column Width

The CSScolumn-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

Specify that the suggested, optimal width for the columns should be 100px:

div {
  column-width: 100px;
}
Try it Yourself »


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


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness
of all content. While using W3Schools, you agree to have read and accepted ourterms of use,cookies andprivacy policy.

Copyright 1999-2025 by Refsnes Data. All Rights Reserved.W3Schools is Powered by W3.CSS.


[8]ページ先頭

©2009-2025 Movatter.jp