style Property

Microsoft FrontPage Visual Basic

style Property

Returns an FPHTMLStyle object that represents the inline style properties for an element. Corresponds to the style attribute.

expression.style

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

Inline styles are style sheets for a single instance of an element and are specified in the element's opening tag. Inline styles are defined using the style attribute, and the data for the attribute is specified using the cascading style sheet langauge. Use the style property to access and set cascading style sheet properties. For more information about cascading style sheets, see CSS Reference.

Example

The following example sets the background color of the active document.

    ActiveDocument.body.Style.backgroundColor = "blue"
  

The following example sets the background color for the first P element in the document.

    ActiveDocument.all.tags("p").Item(0) _
    .Style.cssText = "background-color:yellow"
  

The following example sets the margin for the active document.

    ActiveDocument.body.Style.margin = "10px"