EditLive! 9 Documentation : setWidth Method

This property specifies the width of the Ephox EditLive! applet in pixels. 

When creating an instance of EditLive! using JavaScript or ASP.NET, this property is not needed. The height of the applet is defined in the EditLive! JavaScript Constructor for Javascript and by the AppletSize property for ASP.NET.

Syntax

Visual Basic Script
object.Witdh = intWidth
ASP.NET - EditLiveJava control
prefix:EditLiveJava Width="unitHeight"
ASP.NET - EditableSection control
prefix:EditableSection Width="unitHeight"

Parameters

intWidth

This parameter will specify the width of the applet when displayed. This parameter can take the form of either:

  • An integer representing the width of the applet in pixels (e.g. 200 for 200 pixels), or
  • A percentage representing the width the applet consumes within the HTML element the applet is nested (e.g. 50% for 50 percent).

The default value is 700.

unitHeight

This parameter will specify the height of the applet when displayed. This parameter can be a pixel or percentage value, e.g. "400px", "100%".

The default value is 700px.

Examples

The following code would set the width of the EditLive! instance to 800 pixels.

VBScript
editlive1.Width = 800

Remarks

Ephox recommends setting the width in pixels, as EditLive! will not be resized with the window on Macintosh machines if these values are set as percentages and the Web browser is resized.