---
title: "Defining a container"
description: "Defining a container for the PAdES visual representation in Python, where containers are dictionaries with Top, Bottom, Left, Right, Width and Height."
canonical: "https://docs.lacunasoftware.com/en-us/articles/pki-express/python/visual-rep/containers"
locale: "en"
product: "PKI Express"
last_updated: "2026-07-29"
---

# Defining a container

In Python, the PAdES visual representation rectangles and containers are dictionaries.

## Container

A container has the following parameters `Top`, `Bottom`, `Left`, `Right`, `Width` and `Height` as shown in the figure below.

![PAdES rectangle](https://docs.lacunasoftware.com/images/pki-sdk/pades-rectangle.png)

The container, marked in red, has margins related to the parent element.

To instantiate a container, you must not set all parameters. The sets of specific parameters result in different behaviors. The container's horizontal dimensions explanation is as follows (vertical dimensions are analog to horizontal dimensions, as shown at the end of this page).

### Fluid

Setting `Left` and `Right` parameters, the container will keep the given margin dimensions. The `Width` will adjust itself to fill all the remaining horizontal space, as shown in the figure below.

![PAdES fluid rectangle](https://docs.lacunasoftware.com/images/pki-sdk/fluid.png)

### Left ancored

Setting `Left` and `Width` parameters, the container will keep the given left margin and width. The right margin will adjust itself to the reaming horizontal space, as shown in the figure below.

![PAdES left anchored rectangle](https://docs.lacunasoftware.com/images/pki-sdk/left-anchored.png)

### Right ancored

Setting `Right` and `Width` parameters, the container will keep the given right margin and width. The left margin will adjust itself to the remaining horizontal space, as shown in the figure below.

![PAdES right anchored rectangle](https://docs.lacunasoftware.com/images/pki-sdk/right-anchored.png)

### Centered

Setting only the `Width` parameter, the container will keep the given width. And it will be horizontally centered, as shown in the figure below.

![PAdES centered rectangle](https://docs.lacunasoftware.com/images/pki-sdk/centered.png)

## Vertical dimensions

The vertical dimensions are analog to the horizontal dimensions shown above. If you substitute `Left` and `Right` by `Top` and `Bottom`, and `Width` by `Height`, you get the analog behavior.
