Skip to contents

Use position_<side>() to adjust the position offset of a tag element.

Usage

position_top(x, offset)

position_left(x, offset)

position_bottom(x, offset)

position_right(x, offset)

Arguments

x

A tag element or .style pronoun.

offset

A number specifying a percent. One of,

0, 50, or 100

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    position("absolute") %>%
    position_right(0)
)
#> <div class="position-absolute right-0"></div>