# What is Flexbox?

The `Flexbox Layout`**module of CSS** : it provids us an efficient way to design the lay out, align and distribute space among items within a container block element, even when their size is unknown/dynamic and hence its called Flex = Flexible layout that would adapt to the dynamic size of its contents and space available.

A container element with display: flex would have the ability to alter its items’ width/height (and order) to best fill the available space in a given display size.  A flex container can expands items to fill available free space or shrinks them to prevent overflow. Of course we can control how it fills using the flex css properties.

The flexbox layout is **direction-agnostic** as opposed to the regular layouts (block which is vertically-based and inline which is horizontally-based), we can specify if the container should aling its items horizontally or verically.&#x20;


---

# Agent Instructions: 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:

```
GET https://bharat-tiwari.gitbook.io/our-tech-journal/css/what-is-flexbox.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
