vertical_alignment: Vertical alignment

View source: R/vertical-alignment.R

vertical_alignmentR Documentation

Vertical alignment

Description

The vertical_alignment() function adjusts the inline position of inline, inline-block, and table cell elements. The utility may be used to adjust the vertical alignment of an image in a line of text or the contents of a table cell.

Usage

vertical_alignment(x, alignment)

Arguments

x

A tag element or .style pronoun.

alignment

A character string specifying an alignment. One of,

  • "baseline"

  • "top"

  • "middle"

  • "bottom"

  • "text-top"

  • "text-bottom"

Value

An object of the same type as x.

Examples


library(htmltools)

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


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.