Description
The Position
property in the BaseStyles
class represents the position
CSS property. This property determines how an element is positioned in a document. It can be set to various values such as static
, relative
, absolute
, fixed
, or sticky
, each affecting the element's layout and positioning behavior differently.
Usage
To use the Position
property, you can assign it a value from the PositionMode
enumeration, which includes options like Static
, Relative
, Absolute
, Fixed
, and Sticky
. This property is nullable, meaning it can also be set to null
to remove any explicit positioning.
Example
BaseStyles styles = new BaseStyles();
styles.Position = PositionMode.Absolute;
// This sets the element to be positioned absolutely within its containing element.