System.Nullable<Length> Top { get; set; }

robot_2Generated
code_blocksInput

Description

The Top property in the Sandbox.UI.BaseStyles class represents the top CSS property. This property is used to specify the vertical position of an element relative to its containing element. It is typically used in conjunction with the position property to control the layout of elements on a page.

Usage

To use the Top property, you can assign it a value of type Sandbox.UI.Length, which can be a specific unit like pixels, percentages, or other CSS length units. The property is nullable, meaning it can also be set to null to indicate that the top property is not explicitly set.

Example

// Example of setting the Top property
var styles = new BaseStyles();
styles.Top = new Length(10, LengthUnit.Pixel); // Sets the top position to 10 pixels

// Example of clearing the Top property
styles.Top = null; // Removes the top position setting