CSS Box Model
CSS Box Model
HOME
HTML
CSS
JAVASCRIPT
JQUERY
XML
ASP.NET
PHP
SQL
MORE...
REFERENCES
EXAMPLES
FORUM
Search w3schools.com
CSS Basic
CSS HOME
CSS Introduction
CSS Syntax
CSS Id & Class
CSS How To
CSS Backgrounds
WEB HOSTING
UK Reseller Host
CSS Text
CSS Fonts
CSS Links
CSS Lists
CSS Tables
Developers Love
Previous
Next Chapter
WEB BUILDING
FREE Website C re
SHARE THIS PA
The box model allows us to place a border around elements and space elements in relation to other elements.
The image below illustrates the box model:
CSS Padding
CSS Advanced
CSS Grouping/Nesting
CSS Dimension
CSS Display
CSS Positioning
CSS Floating
CSS Align
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
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
width:250px;
padding:10px;
border:5px solid gray;
margin:10px;
WEB RESOURC
Web Statistics
Web Validation
Example
width:220px;
padding:10px;
border:5px solid gray;
margin:0px;
file:///E:/Document/w3schools-2014/css/css_boxmodel.html
1/2
2/14/14
Previous
Next Chapter
Top 10 Tutorials
Top 10 References
Top 10 Examples
Web Certificates
Color Picker
colorpicker
HTML Tutorial
HTML5 Tutorial
C SS Tutorial
C SS3 Tutorial
JavaScript Tutorial
jQuery Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
XML Tutorial
HTML/HTML5 Reference
C SS 1,2,3 Reference
C SS 3 Browser Support
JavaScript
HTML DOM
XML DOM
PHP Reference
jQuery Reference
ASP.NET Reference
HTML C olors
HTML Examples
C SS Examples
XML Examples
JavaScript Examples
HTML DOM Examples
jQuery Examples
XML DOM Examples
AJAX Examples
ASP Examples
SVG Examples
R EPO R T ER R O R
HO ME |
TO P
HTML C ertificate
HTML5 C ertificate
C SS C ertificate
JavaScript C ertificate
jQuery C ertificate
XML C ertificate
ASP C ertificate
PHP C ertificate
PR INT
FO R UM
ABO UT
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. C opyright 1999-2014 by Refsnes Data. All Rights Reserved.
file:///E:/Document/w3schools-2014/css/css_boxmodel.html
2/2