aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/css/padding-top/index.html
blob: 5457d0e609640de41843c914e28259ac562e4bf4 (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
---
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>

{{csssyntax}}

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

{{Compat("css.properties.padding-top")}}