IHTMLRuleStyle7::backgroundOrigin Property

New for Internet Explorer 9

[This documentation is preliminary and is subject to change.]

Gets or sets the background positioning area of a box or multiple boxes.

Syntax

HRESULT IHTMLRuleStyle7::get_backgroundOrigin(BSTR *p);
HRESULT IHTMLRuleStyle7::put_backgroundOrigin(BSTR v);

Parameters

  • p
    Pointer to a variable of type BSTR that receives the position of the box or boxes.
  • v
    BSTR that specifies the position of the box or boxes.

Possible Values

padding-box Default. The position is relative to the padding box. For single boxes, "0 0" is the upper-left corner of the padding edge; "100% 100%" is the lower-right corner.
border-box The position is relative to the border box.
content-box The position is relative to the content box.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

For elements rendered as a single box, the IHTMLRuleStyle7::backgroundOrigin property specifies the background positioning area. For elements rendered as multiple boxes (for instance, inline boxes on several lines or boxes on several pages), this property specifies which boxes determine the background positioning areas.

If the IHTMLStyle::backgroundAttachment value for this image is fixed, then the IHTMLRuleStyle7::backgroundOrigin property has no effect. In this case, the background positioning area is the initial containing block.

See Also

IHTMLStyle::backgroundColor, IHTMLStyle::backgroundImage, IHTMLStyle::backgroundRepeat, IHTMLStyle::backgroundAttachment, IHTMLStyle::backgroundPosition, IHTMLRuleStyle7::backgroundClip, IHTMLRuleStyle7::backgroundSize, IHTMLStyle::background