Vous êtes sur la page 1sur 2

7/21/2014 CSS3 Multiple Columns

http://www.w3schools.com/css/css3_multiple_columns.asp 1/2
REFERENCES | EXAMPLES | FORUM
CSS Tutorial
CSS HOME
CSS Introduction
CSS Syntax
CSS Selectors
CSS How To
CSS Backgrounds
CSS Text
CSS Fonts
CSS Links
CSS Lists
CSS Tables
CSS Box Model
CSS Border
CSS Outline
CSS Margin
CSS Padding
CSS Dimension
CSS Display
CSS Positioning
CSS Floating
CSS Align
CSS Combinators
CSS Pseudo-class
CSS Pseudo-element
CSS Navigation Bar
CSS Image Gallery
CSS Image Opacity
CSS Image Sprites
CSS Media Types
CSS Attr Selectors
CSS3 Tutorial
CSS3 Introduction
CSS3 Borders
CSS3 Backgrounds
CSS3 Gradients
CSS3 Text Effects
CSS3 Fonts
CSS3 2D Transforms
CSS3 3D Transforms
CSS3 Transitions
CSS3 Animations
CSS3 Multiple Columns
CSS3 User Interface
CSS Summary
CSS Examples
CSS Examples
CSS Quiz
CSS Certificate
CSS References
CSS Reference
CSS Selectors
CSS Reference Aural
CSS Web Safe Fonts
CSS Units
CSS Colors
CSS Color Values
CSS Color Names
CSS Color HEX
Previous Next Chapter
CSS3 Multiple Columns
CSS3 Multiple Columns
With CSS3, you can create multiple columns for laying out text - like in newspapers!
In this chapter you will learn about the following multiple column properties:
column-count
column-gap
column-rule
Browser Support
The numbers in the table specifies the first browser version that fully supports the property.
Numbers followed by -webkit- or -moz- specifies the first version that worked with a prefix.
Property
column-count 10.0 4.0 -webkit- 2.0 -moz- 3.1 -webkit- 15.0 -webkit-
11.1
column-gap 10.0 4.0 -webkit- 2.0 -moz- 3.1 -webkit- 15.0 -webkit-
11.1
column-rule 10.0 4.0 -webkit- 2.0 -moz- 3.1 -webkit- 15.0 -webkit-
11.1
CSS3 Create Multiple Columns
The column-count property specifies the number of columns an element should be divided into:
Example
Divide the text in a div element into three columns:
div {
-webkit-column-count: 3; /* Chrome, Safari, Opera */
-moz-column-count: 3; /* Firefox */
column-count: 3;
}
Try it yourself
CSS3 Specify the Gap Between Columns
The column-gap property specifies the gap between the columns:
Example
Specify a 40 pixels gap between the columns:
div {
-webkit-column-gap: 40px; /* Chrome, Safari, Opera */
-moz-column-gap: 40px; /* Firefox */
column-gap: 40px;
}
Try it yourself
CSS3 Column Rules
The column-rule property sets the width, style, and color of the rule between columns.
Example
Specify the width, style and color of the rule between columns:
Search w3schools.com:
WEB HOSTING
WEB BUILDING
W3SCHOOLS EXAMS
HTML, CSS, JavaScript,
PHP, jQuery, XML, and
ASP Certifications
SHARE THIS PAGE
WEB RESOURCES
Web Statistics
Web Validation
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
Select Language
7/21/2014 CSS3 Multiple Columns
http://www.w3schools.com/css/css3_multiple_columns.asp 2/2
Previous Next Chapter
div {
-webkit-column-rule: 3px outset #ff00ff; /* Chrome, Safari, Opera */
-moz-column-rule: 3px outset #ff00ff; /* Firefox */
column-rule: 3px outset #ff00ff;
}
Try it yourself
CSS3 Multiple Columns Properties
The following table lists all the multiple columns properties:
Property Description CSS
column-count Specifies the number of columns an element should be divided into 3
column-fill Specifies how to fill columns 3
column-gap Specifies the gap between the columns 3
column-rule A shorthand property for setting all the column-rule-* properties 3
column-rule-color Specifies the color of the rule between columns 3
column-rule-style Specifies the style of the rule between columns 3
column-rule-width Specifies the width of the rule between columns 3
column-span Specifies how many columns an element should span across 3
column-width Specifies the width of the columns 3
columns A shorthand property for setting column-width and column-count 3
REPORT ERROR | HOME | TOP | PRINT | FORUM | ABOUT | ADVERTISE WITH US
Top 10 Tutorials
HTML Tutorial
HTML5 Tutorial
CSS Tutorial
CSS3 Tutorial
JavaScript Tutorial
jQuery Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
XML Tutorial
Top 10 References
HTML/HTML5 Reference
CSS 1,2,3 Reference
CSS 3 Browser Support
JavaScript
HTML DOM
XML DOM
PHP Reference
jQuery Reference
ASP.NET Reference
HTML Colors
Top 10 Examples
HTML Examples
CSS Examples
JavaScript Examples
HTML DOM Examples
PHP Examples
jQuery Examples
XML Examples
XML DOM Examples
ASP Examples
SVG Examples
Web Certificates
HTML Certificate
HTML5 Certificate
CSS Certificate
JavaScript Certificate
jQuery Certificate
PHP Certificate
XML Certificate
ASP Certificate
Color Picker
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples
are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use,
cookie and privacy policy. Copyright 1999-2014 by Refsnes Data. All Rights Reserved.

Vous aimerez peut-être aussi