Learn R Programming

cascadess (version 0.1.0)

position: Position an element

Description

The position() adjusts how an element is positioned. Positioning could be absolute or relative. Furthermore, you can arrange an element within its parent element using top, right, bottom, or left.

Usage

position(
  x,
  value,
  top = NULL,
  right = NULL,
  bottom = NULL,
  left = NULL,
  by = "edge"
)

Arguments

x

A tag element or .style pronoun.

value

One of "static", "relative", "absolute", "fixed", or "sticky" specifying how the element is positioned.

top, right, bottom, left

One of 0, 50, or 100 specifying where the element is positioned. By default these values position an element using the element's edge, see argument by. Defaults to NULL, in which case the argument is ignored.

by

One of "" or "by-center" specifying the element's positioning anchor, defaults to "edge".

Examples

Run this code
# NOT RUN {
library(htmltools)

div(
  div(.style %>% position("absolute", t = 0, r = 0))
)

# }

Run the code above in your browser using DataLab