IHTMLStyle6::msBoxSizing Property

New for Windows Internet Explorer 8

Note: This documentation is preliminary and is subject to change.

Sets or retrieves the box model to use for object sizing.

Syntax

HRESULT IHTMLStyle6::get_msBoxSizing(BSTR *p);
HRESULT IHTMLStyle6::put_msBoxSizing(BSTR v);

Parameters

  • p
    Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
  • v
    BSTR that specifies one of the values listed in Possible Values.

Possible Values

content-box Default. The specified width and height apply to the width and height respectively of the content box of the element. The padding and border of the element are drawn outside this area.
border-box The specified width and height determine the border box of the element. Any padding or border specified on the element is drawn inside the remaining area. The content box is computed by subtracting the padding or border widths of the respective sides from the specified width and height.

This is the default behavior of width and height in IE5 mode for replaced elements and input elements, such as buttons.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

This property requires Internet Explorer to be in IE8 mode rendering.

The -ms- prefix is optional. You can use box-sizing instead of -ms-box-sizing (and boxSizing instead of msBoxSizing), and the effect will be the same. As box-sizing is defined in the Cascading Style Sheets (CSS), Level 2 Revision 1 (CSS2.1) specification, that form is preferred.