Learn R Programming

cascadess (version 0.1.0)

align: Inline alignment

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

align(x, vertical)

Arguments

x

A tag element or .style pronoun.

vertical

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

Examples

Run this code
# NOT RUN {
library(htmltools)

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

# }

Run the code above in your browser using DataLab