Position - Calaméo Knowledge Base
Not a Calaméo member yet?
Sign up now! It's FREE!
Get the latest news on Calaméo
Follow us on Facebook
Get Calaméo updates in real-time
Follow us on Twitter

Position

From Calaméo Knowledge Base

The CSML language provides many different attributes for positioning.

Contents

From the center

Attribute Description
horizontalCenter When set, if left or right is not set, the layout will be centered horizontally offset by the numeric value of this property.
percentHorizontalCenter When set, if left or right is not set, the layout will be centered horizontally offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100%.
minHorizontalCenter The minimum horizontal center location that can be applied through percentHorizontalCenter.
maxHorizontalCenter The maximum horizontal center location that can be applied through percentHorizontalCenter.
verticalCenter When set, if top or bottom is not set, the layout will be centered vertically offset by the numeric value of this property.
percentVerticalCenter When set, if top or bottom is not set, the layout will be centered vertically offset by the value of this multiplied by to the containing height. A value of 0 represents 0% and 1 represents 100%.
minVerticalCenter The minimum vertical center location that can be applied through percentVerticalCenter.
maxVerticalCenter The maximum vertical center location that can be applied through percentVerticalCenter.

From the top

Attribute Description
top When set, the top of the layout will be located offset from the top of it's container by the value of this property.
percentTop When set, the top of the layout will be located offset by the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100%.
offsetTop Add additional offset to be added to the top value after it has been set.
minTop The minimum top location that can be applied to the layout boundaries.
maxTop The maximum top location that can be applied to the layout boundaries.

From the bottom

Attribute Description
bottom When set, the bottom of the layout will be located offset from the bottom of it's container by the value of this property.
percentBottom When set, the bottom of the layout will be located offset by the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100%.
offsetBottom Add additional offset to be added to the bottom value after it has been set.
minBottom The minimum bottom location that can be applied to the layout boundaries.
maxBottom The maximum bottom location that can be applied to the layout boundaries.

From the left

Attribute Description
left When set, the left of the layout will be located offset by the value of this property multiplied by the containing width.
percentLeft When set, the left of the layout will be located offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100%.
offsetLeft Add additional offset to be added to the left value after it has been set.
minLeft The minimum left location that can be applied to the layout boundaries.
maxLeft The maximum left location that can be applied to the layout boundaries.

From the right

Attribute Description
right When set, the right of the layout will be located offset by the value of this property multiplied by the containing width.
percentRight When set, the right of the layout will be located offset by the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100%.
offsetRight Add additional offset to be added to the right value after it has been set.
minRight The minimum right location that can be applied to the layout boundaries.
maxRight The maximum right location that can be applied to the layout boundaries.

Absolute positionning

Attribute Description
x Defines the x location (top left) of the layout boundary. Unlike left, x does not affect a layout's width. Once left (or percentLeft) is set, the x value no longer applies. If percentX exists when x is set, percentX will be overridden and be given a value of NaN. When a Layout is created for a display object, this is defined as the x location of that display object. The value of x itself cannot be NaN.
percentX When set, the x location of the layout will be located at the value of this property multiplied by the containing width. A value of 0 represents 0% and 1 represents 100%.
minX The minimum x location that can be applied to the layout boundaries.
maxX The maximum x location that can be applied to the layout boundaries.
y Defines the y location (top left) of the layout boundary. Unlike top, y does not affect a layout's height. Once top (or percentTop) is set, the y value no longer applies. If percentY exists when y is set, percentY will be overridden and be given a value of NaN. When a Layout is created for a display object, this is defined as the y location of that display object. The value of y itself cannot be NaN.
percentY When set, the y location of the layout will be located at the value of this property multiplied by the containing height. A value of 0 represents 0% and 1 represents 100%.
minY The minimum y location that can be applied to the layout boundaries.
maxY The maximum y location that can be applied to the layout boundaries.

Scope

These attributes applies to the following statement: