aboutsummaryrefslogtreecommitdiff
path: root/files/fa/web/css/css_box_model/index.html
blob: ed6760a26a5182685d9f349a51ebc7da365bb8be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
title: CSS Basic Box Model
slug: Web/CSS/CSS_Box_Model
tags:
  - CSS
  - CSS Box Model
  - Guide
  - NeedsTranslation
  - Overview
  - Reference
  - TopicStub
translation_of: Web/CSS/CSS_Box_Model
---
<div>{{CSSRef}}</div>

<p><strong>CSS Basic Box Model</strong> is a module of CSS that defines the rectangular boxes—including their padding and margin—that are generated for elements and laid out according to the <a href="/en-US/docs/Web/CSS/Visual_formatting_model">visual formatting model</a>.</p>

<h2 id="Reference">Reference</h2>

<h3 id="Properties">Properties</h3>

<h4 id="Properties_controlling_the_flow_of_content_in_a_box">Properties controlling the flow of content in a box</h4>

<div class="index">
<ul>
 <li>{{CSSxRef("overflow")}}</li>
 <li>{{CSSxRef("overflow-x")}}</li>
 <li>{{CSSxRef("overflow-y")}}</li>
</ul>
</div>

<h4 id="Properties_controlling_the_size_of_a_box">Properties controlling the size of a box</h4>

<div class="index">
<ul>
 <li>{{CSSxRef("height")}}</li>
 <li>{{CSSxRef("width")}}</li>
 <li>{{CSSxRef("max-height")}}</li>
 <li>{{CSSxRef("max-width")}}</li>
 <li>{{CSSxRef("min-height")}}</li>
 <li>{{CSSxRef("min-width")}}</li>
</ul>
</div>

<h4 id="Properties_controlling_the_margins_of_a_box">Properties controlling the margins of a box</h4>

<div class="index">
<ul>
 <li>{{CSSxRef("margin")}}</li>
 <li>{{CSSxRef("margin-bottom")}}</li>
 <li>{{CSSxRef("margin-left")}}</li>
 <li>{{CSSxRef("margin-right")}}</li>
 <li>{{CSSxRef("margin-top")}}</li>
 <li>{{CSSxRef("margin-trim")}} {{Experimental_Inline}}</li>
</ul>
</div>

<h4 id="Properties_controlling_the_paddings_of_a_box">Properties controlling the paddings of a box</h4>

<div class="index">
<ul>
 <li>{{CSSxRef("padding")}}</li>
 <li>{{CSSxRef("padding-bottom")}}</li>
 <li>{{CSSxRef("padding-left")}}</li>
 <li>{{CSSxRef("padding-right")}}</li>
 <li>{{CSSxRef("padding-top")}}</li>
</ul>
</div>

<h4 id="Other_properties">Other properties</h4>

<div class="index">
<ul>
 <li>{{CSSxRef("visibility")}}</li>
</ul>
</div>

<h2 id="Guides">Guides</h2>

<dl>
 <dt><a href="/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model">Introduction to the CSS box model</a></dt>
 <dd>Explains one of the fundamental concept of CSS: the box model. This model defines how CSS lays out elements, including their content, padding, border, and margin areas.</dd>
 <dt><a href="/en-US/docs/Web/CSS/CSS_Box_Model/Mastering_margin_collapsing">Mastering margin collapsing</a></dt>
 <dd>Sometimes, two adjacent margins are collapsed into one. This article describes the rules that govern when and why this happens, and how to control it.</dd>
 <dt><a href="/en-US/docs/Web/CSS/Visual_formatting_model">Visual formatting model</a></dt>
 <dd>Explains the visual formatting model.</dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName("CSS3 Box")}}</td>
   <td>{{Spec2("CSS3 Box")}}</td>
   <td>Added <code style="white-space: nowrap;">margin-trim</code></td>
  </tr>
  <tr>
   <td>{{SpecName("CSS2.1", "box.html")}}</td>
   <td>{{Spec2("CSS2.1")}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName("CSS1")}}</td>
   <td>{{Spec2("CSS1")}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>