> For the complete documentation index, see [llms.txt](https://irena-popova.gitbook.io/flexbox/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://irena-popova.gitbook.io/flexbox/align-items-row.md).

# align-items\[row]

## align-items \[row] <a href="#day-15-align-items-row" id="day-15-align-items-row"></a>

So justify-content controls how items are laid out on the main axis. What about their layout in the cross axis? Don't worry, that's where align-items come into play. Remember the cross axis is always perpendicular to the main axis. So if the main axis is sitting horizontally, where flex-direction is row. Then , the cross axis is sitting vertically. 🤓

```css
.parent {
  align-items: stretch /* default */
            or flex-start
            or flex-end
            or center
            or baseline
}
```

The **align-items** property is used to align the flex items.

* The center value aligns the flex items in the middle of the container:&#x20;

```css
.flex-container { 
display: flex; 
height: 200px;
 align-items: center; }
```

* The flex-start value aligns the flex items at the top of the container:&#x20;

```css
.flex-container { 
display: flex; 
height: 200px; 
align-items: flex-start; }
```

* The flex-end value aligns the flex items at the bottom of the container:&#x20;

```css
.flex-container { 
display: flex;
 height: 200px; 
 align-items: flex-end; }
```

* The stretch value stretches the flex items to fill the container (this is default):&#x20;

```css
.flex-container { 
display: flex; 
height: 200px; 
align-items: stretch; }
```

* The baseline value aligns the flex items such as their baselines aligns:&#x20;

```css
.flex-container { 
display: flex;
 height: 200px; 
 align-items: baseline; }
```

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://irena-popova.gitbook.io/flexbox/align-items-row.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
