aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/css/padding-top/index.html
blob: a635951fcc6d42c24d3c42be1a5431e82218cbf2 (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
---
title: padding-top
slug: Web/CSS/padding-top
translation_of: Web/CSS/padding-top
---
<p>{{CSSRef}}</p>

<h2 id="Summary" name="Summary">Sumario</h2>

<p class="brush: js">La propiedad <strong><code>padding-top</code></strong> <a href="/en/CSS" title="CSS">CSS</a> establece el espacio de relleno requerido en la parte superior del elemento. El <a href="/en/CSS/box_model#padding">área de padding</a> es el espacio entre el contenido del elemento y su borde. Contrariamente de la propiedad <strong><code>margin-top</code></strong>, valores negativos no son válidos.</p>

<p>{{cssinfo}}</p>

<h2 id="Syntax" name="Syntax">Sintaxis</h2>

<pre class="brush:css">/* &lt;length&gt; values (valores fijos) */
padding-top: 0.5em;
padding-top: 0;
padding-top: 2cm;

/* &lt;percentage&gt; value (valores porcentuales) */
padding-top: 10%;

/* Global values (valores globales) */
padding-top: inherit;
padding-top: initial;
padding-top: unset;
</pre>

<h3 id="Values" name="Values">Valores</h3>

<dl>
 <dt><code>&lt;length&gt;</code></dt>
 <dd>Especifica un valor positivo fijo. Veáse {{cssxref("&lt;length&gt;")}} para más detalles.</dd>
 <dt><code>&lt;percentage&gt;</code></dt>
 <dd>Especifica un porcentaje con respecto al bloque que lo contiene.</dd>
</dl>

<h3 id="Sintaxis_formal">Sintaxis formal</h3>

<pre class="syntaxbox">{{csssyntax}}</pre>

<h2 id="Examples" name="Examples">Ejemplos</h2>

<pre class="brush: css">.content { padding-top: 5%; }
.sidebox { padding-top: 10px; }
</pre>

<h2 id="Especificaciones">Especificaciones</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificación</th>
   <th scope="col">Estado</th>
   <th scope="col">Comentarios</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{ SpecName('CSS3 Box', '#the-padding', 'padding-top') }}</td>
   <td>{{ Spec2('CSS3 Box') }}</td>
   <td>No change from {{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-top') }}.</td>
  </tr>
  <tr>
   <td>{{ SpecName('CSS3 Transitions', '#animatable-css', 'padding-top') }}</td>
   <td>{{ Spec2('CSS3 Transitions') }}</td>
   <td>Defines <code>padding-top</code> as animatable.</td>
  </tr>
  <tr>
   <td>{{ SpecName('CSS2.1', 'box.html#padding-properties', 'padding-top') }}</td>
   <td>{{ Spec2('CSS2.1') }}</td>
   <td>No change from {{ Specname('CSS1', '#padding-top', 'padding-top') }}.</td>
  </tr>
  <tr>
   <td>{{ Specname('CSS1', '#padding-top', 'padding-top') }}</td>
   <td>{{ Spec2('CSS1') }}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_Compatibility" name="Browser_Compatibility">Compatibilidad en navegadores</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Características</th>
   <th>Chrome</th>
   <th>Edge</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari (WebKit)</th>
  </tr>
  <tr>
   <td>Soporte Básico</td>
   <td>1.0</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>1.0 (1.0)</td>
   <td>4.0</td>
   <td>3.5</td>
   <td>1.0 (85)</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Características</th>
   <th>Android</th>
   <th>Edge</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Soporte Básico</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
   <td>{{ CompatUnknown() }}</td>
  </tr>
 </tbody>
</table>
</div>