Class Attribute

HTML (DHTML)

Class Attribute

Internet Development Index

Refers to a definition of a CSS style. Read/write String.

Applies To

Shape

Tag Syntax

<v:element class="expression">

Script Syntax

element.classname="expression"

expression=element.classname

Remarks

The class attribute is similar to the standard HTML class attribute used with CSS style sheets.

Note that classname is used instead of class for scripting. Also note that for scripting, the classname can only be read; changing the value of classname will not change the rendering of the shape.

VML Standard Attribute

See Also

Shape

Example

A class for width is created with the style

   .narrowstyle {width:50;height:100}

Then the width is referenced by including the style. Note that the width and height is not defined in the style attribute, but will be defined by the style.

   <v:shape id="rect01" class="narrowstyle"
   fillcolor="red" strokecolor="red"
   coordorigin="0 0" coordsize="200 200"
   style="position:relative;top:1;left:1"
   path="m 1,1 l 1,200, 200,200, 200,1 x e">
   </v:shape>

Note that Class only applies to CSS-type attributes.