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

# grid-column-end

APISummary
## Introduction

The `grid-column-end` CSS property specifies a grid item's end position within the grid column by contributing a line, a span, or nothing (automatic) to its grid placement.

## Examples

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

**Entry:** `src/grid-column-end`
**Bundle:** `dist/grid-column-end.lynx.bundle`

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

const GridColumnEnd = () => {
  const titleStyle = {
    fontSize: "45rpx" as const,
    fontWeight: "900" as const,
    alignSelf: "center" as const,
    color: "linear-gradient(to right, rgb(255,53,26), rgb(0,235,235))" as const,
  };

  return (
    <>
      <text style={titleStyle}>grid-column-end: auto</text>
      <view className="container">
        <text className="item" style={{ backgroundColor: "rgb(255,53,26)", gridColumnEnd: "auto" }}>ONE</text>
        <text className="item">TWO</text>
        <text className="item">THREE</text>
      </view>

      <text style={titleStyle}>grid-column-end: 3</text>
      <view className="container">
        <text className="item" style={{ backgroundColor: "rgb(255,53,26)", gridColumnEnd: "3" }}>ONE</text>
        <text className="item">TWO</text>
        <text className="item">THREE</text>
      </view>

      <text style={titleStyle}>grid-column-end: -1</text>
      <view className="container">
        <text className="item" style={{ backgroundColor: "rgb(255,53,26)", gridColumnEnd: "-1" }}>ONE</text>
        <text className="item">TWO</text>
        <text className="item">THREE</text>
      </view>
    </>
  );
};

root.render(<GridColumnEnd />);

```

v0.11.0



## Syntax

```css
/* <number> values */
grid-column-end: 2;
grid-column-end: 3;

/* span <number> values*/
grid-column-end: span 1;
```

### Values

- `auto`

  **Default value**. Is a keyword indicating that the property contributes nothing to the grid item's placement, indicating auto-placement, an automatic span, or a default span of `1`.

- `<number>`

  Contributes the nth grid line to the grid item's placement. If a negative integer is given, it instead counts in reverse, starting from the end edge of the explicit grid. An integer value of 0 is invalid.

- span && `<number>`

  Contributes a grid span to the grid item's placement such that the column end edge of the grid item's grid area is n lines from the start edge.

## Formal definition

| Initial value | `auto` |
| Applies to | grid items |
| Inherited | no |
| Animatable |  |


## Formal syntax

```
grid-column-end = <number> | [span && <number>]
```

## Differences from the Web

- `<custom-ident>`, `span && <custom-ident>`, `<integer> && <custom-ident>?` are not supported.

## Notes

- When `grid-column-start` and `grid-column-end` specify two distinct grid lines, the column span is determined by the distance between those lines, and [`grid-column-span`](/next/api/css/properties/grid-column-span.md) is ignored. The following item spans three columns:

  ```css
  grid-column-start: 2;
  grid-column-end: 5;
  grid-column-span: 1;
  ```

- Do not combine `grid-column-span` with `span <number>` in `grid-column-start` or `grid-column-end`. Both specify the column span and can override each other. The following declarations specify conflicting spans of three columns and one column:

  ```css
  grid-column-start: 2;
  grid-column-end: span 3;
  grid-column-span: 1;
  ```

## Compatibility

**Compatibility Table**

**Query:** `css.properties.grid-column-end`

[Source](https://github.com/lynx-family/lynx/blob/develop/tools/css_generator/css_defines/178-grid-column-end.json) · [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end)

| Feature | Android | HarmonyOS | iOS | macOS | Windows | Web |
| --- | --- | --- | --- | --- | --- | --- |
| grid-column-end | Yes (2.1) | Yes (3.4) | Yes (2.1) | Yes (2.1) | Yes (2.1) | Yes |

**`grid-column-end`**

**Specifications:**

