margin-bottom
Baseline
Ampliamente disponible
*
Esta característica está consolidada y funciona en muchos dispositivos y versiones de navegador. Está disponible en todos los navegadores desde julio de 2015.
* Algunas partes de esta característica pueden tener distintos niveles de compatibilidad.
Summary
El
margin-bottom CSS (margen-inferior) es la propiedad de un elemento que establece el espacio requerido en la parte inferior de un elemento. Tambien se permiten valores negativos.
Esta propiedad no tiene ningun efecto sobre los elementos en linea non-replaced , como <tt> o <span>.
| Valor inicial | 0 |
|---|---|
| Applies to | all elements, except elements with table display types other than table-caption, table and inline-table. It also applies to ::first-letter. |
| Heredable | no |
| Percentages | refer to the width of the containing block |
| Valor calculado | the percentage as specified or the absolute length |
| Animation type | a length |
Syntax
Formal syntax:margin-bottom =
<length-percentage> |
auto |
<anchor-size()>
<length-percentage> =
<length> |
<percentage>
<anchor-size()> =
anchor-size( [ <anchor-name> || <anchor-size> ]? , <length-percentage>? )
<anchor-name> =
<dashed-ident>
<anchor-size> =
width |
height |
block |
inline |
self-block |
self-inline
margin-bottom: 10px; /* Una longitud absoluta (sin redimension) */ margin-bottom: 1em; /* Una longitud en relacion con el tamaño del texto */ margin-bottom: 5%; /* Un margen respecto al ancho de su objeto padre (el que lo contiene) */ margin-bottom: auto; margin-bottom: inherit; /*margen heredado*/
Values
<length>-
Specifies a fixed width. See
<length>for possible values. <percentage>-
A
<percentage>always relative to the width of the containing block. auto-
See
margin.
Examples
css
.content {
margin-bottom: 5%;
}
.sidebox {
margin-bottom: 10px;
}
.logo {
margin-bottom: -5px;
}
#header {
margin-bottom: 1em;
}
Especificaciones
| Especificación |
|---|
| CSS Box Model Module Level 3> # margin-physical> |