---
title: "Defining a container"
description: "Defining containers for the PAdES visual representation with PadesVisualRectangle: the Top, Bottom, Left, Right, Width and Height parameters and what each does."
canonical: "https://docs.lacunasoftware.com/en-us/articles/pki-sdk/signatures/pades/visual-rep/containers"
locale: "en"
product: "PKI SDK"
last_updated: "2026-10-12"
---

# Defining a container

In the visual representation of a PAdES signature, rectangles and containers are defined with the
@Lacuna.Pki.Pades.PadesVisualRectangle class.

## Container

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

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

The container, in red, has its margins relative to the element it is placed in.

To create a container, though, you don't fill in all of its parameters. Each set of parameters has a different effect. The
examples below show the ways to define the horizontal dimensions of a container (the vertical dimensions work the same way, as
explained after the examples).

### Fluid

If you set only `Left` and `Right`, the container keeps the given margins and its width (`Width`) stretches to fill the
remaining horizontal space, as in the figure below.

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

### Left-anchored

If you set only `Left` and `Width`, the container keeps the given left margin and width. The right margin takes up the remaining
horizontal space, as in the figure below.

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

### Right-anchored

If you set only `Right` and `Width`, the container keeps the given right margin and width. The left margin takes up the remaining
horizontal space, as in the figure below.

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

### Centered

If you set only `Width`, the container is centered horizontally with the given width, as in the figure below.

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

## Vertical dimensions

The vertical dimensions work the same way as the horizontal dimensions above: replace `Left` and `Right` with `Top` and
`Bottom`, and `Width` with `Height`.

## See also

* @Lacuna.Pki.Pades.PadesVisualRectangle
