> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# relative-align-left

APISummary
## Introduction

In [relative-layout](/next/guide/ui/layout/relative-layout.md), specifies that the current element is aligned with the left edge of the parent or sibling element corresponding to [`id`](/next/api/css/properties/relative-id.md).

## Examples

**This is an example below: css-api**

**Entry:** `src/relative-align-left`
**Bundle:** `dist/relative-align-left.lynx.bundle`

```tsx
import { root, useState } from "@lynx-js/react";
import "./index.scss";

const RelativeAlignLeft = () => {
  const containerStyle = {
    display: "relative" as const,
    relativeLayoutOnce: true,
    marginBottom: "20px" as const,
  };

  const view1Style = {
    relativeId: "1",
    display: "linear" as const,
    relativeCenter: "horizontal" as const,
    backgroundColor: "lightgreen",
    alignItems: "center" as const,
    textAlign: "center" as const,
  };

  const view2Style = {
    display: "linear" as const,
    relativeAlignLeft: "1",
    alignItems: "center" as const,
    relativeAlignBottom: "parent" as const,
    backgroundColor: "lightblue",
  };

  const view3Style = {
    display: "linear" as const,
    relativeAlignLeft: "parent" as const,
    relativeCenter: "vertical" as const,
    alignItems: "center" as const,
    backgroundColor: "pink",
  };
  const textStyle = {
    fontSize: "40rpx" as const,
    fontWeight: "600" as const,
    textAlign: "center" as const,
  };

  return (
    <scroll-view className="root" scroll-orientation="vertical">
      <view className="container" style={containerStyle}>
        <view style={view1Style}>
          <text style={textStyle}>relative-id: 1</text>
          <text style={textStyle}>relative-center: horizontal</text>
        </view>
        <view style={view2Style}>
          <text style={textStyle}>relative-align-left: 1</text>
          <text style={textStyle}>relative-align-bottom: parent</text>
        </view>
        <view style={view3Style}>
          <text style={textStyle}>relative-align-left: parent</text>
          <text style={textStyle}>relative-center: horizontal</text>
        </view>
      </view>
    </scroll-view>
  );
};

root.render(<RelativeAlignLeft />);

```

v0.11.0



## Syntax

```css
relative-align-left: parent;
relative-align-left: none;

relative-align-left: 1;
relative-align-left: 2;
```

### Values

- `none`

  **Default Value**. Does not align on the left edge.

- `parent`

  The left edge is aligned with the parent element.

- `<number>`

  `int` only. The left edge is aligned with the sibling element corresponding to this value(refer to [`relative-id`](/next/api/css/properties/relative-id.md)).

  :::info
  Attention please when setting [`relative-id`](/next/api/css/properties/relative-id.md): `-1` and `0` are special values. `-1` is the default value, indicating that the current element will not be considered as the alignment reference standard for sibling elements. Using `0` as an element ID is not allowed, as it will result in unexpected behavior.
  :::

## Formal definition

| Initial value | `none` |
| Applies to | relative items |
| Inherited | no |
| Animatable |  |


## Formal syntax

```
relative-align-left = none | parent | <number>
```

## Differences from the Web

- There is no such style in web.

## Compatibility

**Compatibility Table**

**Query:** `css.properties.relative-align-left`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/135-relative-align-left.json)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| relative-align-left | Yes (1.4) | Yes (3.4) | Yes (1.4) | Yes (1.4) | Yes (1.4) | No |

**`relative-align-left`**

Specifies that the current element is aligned with the left edge of the parent or sibling element corresponding to id.

**Specifications:**

