align: Inline alignment

Description Usage Arguments Examples

View source: R/align.R

Description

The align() function adjusts the inline alignment of an element. This applies only to inline elements and may be used to adjust the vertical alignment of an image in a line of text or the contents of a table cell.

For broader alignment purposes use flex box, see flex().

Usage

1
align(x, vertical)

Arguments

x

A tag element or .style pronoun.

vertical

One of "baseline", "top", "middle", "bottom", "text-top", or "text-bottom".

Examples

1
2
3
4
5
6
7
library(htmltools)

div(
  "Text",
  span("Above") %>% align("top"),
  span("Below") %>% align("bottom")
)

cascadess documentation built on Jan. 13, 2021, 5:10 p.m.