CSS:-moz-background-origin
From MDC
« CSS Reference « CSS Reference:Mozilla Extensions
[edit] Summary
In Mozilla applications, -moz-background-origin determines which box establishes the coordinate system used by the values of the background-position property:
- Initial value:
padding - Applies to: all elements
- Inherited: no
- Percentages: N/A
- Media:
visual - Computed value:
-moz-background-origin is an experimental implementation of the proposed CSS 3 background-origin property, which has not yet reached Candidate Recommendation (call for implementations).
-moz-background-origin does not apply when background-attachment is fixed.
[edit] Syntax
-moz-background-origin: border | padding | content
[edit] Values
- border
- The background position is relative to the border, so the image can go behind the border.
- padding
- The background position is relative to the padding.
- content
- The background position is relative to the content.
[edit] Examples
hbox.example {
border: 10px double #000000;
padding: 10px;
background: url('image.jpg');
background-position: center left;
/* The background will be inside the padding */
-moz-background-origin: content;
}
[edit] Known bugs
-moz-background-origin: content does not account correctly for percentage padding.