background property

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

Sets or retrieves up to five separate background properties of the object.

CSS 2.1, Section 5.3.7

Syntax

Integer value = object.put_background(BSTR v);Integer value = object.get_background(BSTR* sBackground);

Property values

Type: BSTR

up to five of the space-delimited Possible Values, in any order.

color (transparent)

Any of the range of color values available to the background-color property.

image (none)

Any of the range of image values available to the background-image property.

repeat (repeat)

Any of the range of repeat values available to the background-repeat property.

attachment (scroll)

Any of the range of attachment values available to the background-attachment property.

position (0% 0%)

Any of the range of position values available to the background-position property.

String format

[ <color> || image || repeat || attachment || position ]

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value

Standards information

Remarks

The background property is a composite property. Separate properties can be used to specify each property, but in many cases it is more convenient to set them in one place using this composite property.

Individual background properties not set by the composite background property are set to their default values. For example, the default value for image is none. Setting background: white is equivalent to setting background: white none repeat scroll 0% 0%. So, in addition to setting the background color to white, setting background: white clears any image, repeat, attachment, or position values previously set.

The background properties render in the object's content and padding; however, borders are set using the border properties.

Although objects do not inherit the background property, the background image or color of an object's parent appears behind an object if a background is not specified.

For more information about supported colors, see the BUGBUG! missing link text: ie.Color_Table.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

DLL

Mshtml.dll

 

 

Build date: 1/23/2012

Community Additions

Show: