# Elementname: `Box`

CSS name: box

## Description

Create a rectangular colored area. The area must fit the grid cells.

Allowed attributes: backgroundcolor, bleed, class, height, id, padding-bottom, padding-left, padding-right, padding-top, width

Child elements: (none)

Parent elements: Frame, Overlay, PlaceObject, Position, Td, Transformation

### Attributes

backgroundcolor (text, optional, CSS property: background-color)

  Color of the box. If the color name is a dash (`-`), a transparent background is used.

bleed (optional)

  Lets the box increase its size by the amount of trim given in the options. Useful for thumb indexes. The contents of the attribute is either »left«, »right«, »top« or »bottom« or any combination such as »top,right«.

  top: | Increase the size to the top.
  left: | Increase the size to the left.
  bottom: | Increase the size to the bottom.
  right: | Increase the size to the right.
  top,left: | Increase the size to the top and left.
  top,right: | Increase the size to the top and right.
  bottom,left: | Increase the size to the bottom and left.
  bottom,right: | Increase the size to the bottom and right.

class (text, optional)

  CSS class for this box.

height (number or length)

  Height of the box in grid cells.

id (text, optional)

  CSS id for this box.

padding-bottom (length, optional, CSS property: padding-bottom, since version 2.5.10)

  Set the inner distance (width between contents and the border) to the bottom edge.

padding-left (length, optional, CSS property: padding-left, since version 2.5.10)

  Set the inner distance (width between contents and the border) to the left edge.

padding-right (length, optional, CSS property: padding-right, since version 2.5.10)

  Set the inner distance (width between contents and the border) to the right edge.

padding-top (length, optional, CSS property: padding-top, since version 2.5.10)

  Set the inner distance (width between contents and the border) to the top edge.

width (number or length)

  Width of the box in grid cells or in absolute values.

## Example

    <DefineColor name="mygreen" model="cmyk" c="22" m="0" y="55" k="0"/>
    <PlaceObject>
      <Box width="10" height="5" backgroundcolor="mygreen"/>
    </PlaceObject>

looks like

## See also

DefineColor, PlaceObject

# Commands

- A
- Action
- AtPageCreation
- AtPageShipout
- Attribute
- B
- Barcode
- Bold
- BoldItalic
- Bookmark
- Box
- Br
- Case
- Circle
- Color
- Column
- Columns
- Compatibility
- Contents
- Copy-of
- DefineColor
- DefineFontalias
- DefineFontfamily
- DefineTextformat
- Element
- Fontface
- ForAll
- Frame
- Grid
- Group
- Groupcontents
- HSpace
- Hyphenation
- I
- Image
- Include
- Initial
- InsertPages
- Italic
- Layout
- Li
- LoadDataset
- LoadFontfile
- Loop
- Makeindex
- Margin
- Mark
- Message
- NewPage
- NextFrame
- NextRow
- NoBreak
- Ol
- Options
- Otherwise
- Output
- Overlay
- PDFOptions
- Pageformat
- Pagetype
- Paragraph
- PlaceObject
- Position
- PositioningArea
- PositioningFrame
- ProcessNode
- Record
- Regular
- Rule
- SaveDataset
- SavePages
- SetGrid
- SetVariable
- SortSequence
- Stylesheet
- Sub
- Sup
- Switch
- Table
- Tablefoot
- Tablehead
- Tablerule
- Td
- Text
- Textblock
- Tr
- Trace
- Transformation
- U
- URL
- Ul
- Until
- VSpace
- Value
- While

Version: 3.0.1 | Start page | Command reference | Other language: German