float: Floats

Description Usage Arguments Examples

View source: R/float.R

Description

The float() function places an element to the left or right side of its parent element. Other text and inline elements wrap around floated elements. Note, float() has no effect on flex items.

Usage

1
float(x, side)

Arguments

x

A tag element or .style pronoun.

side

A responsive argument.

One of "left", "left", "right", "right", or "none" specifying the side to float the element.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(htmltools)

div(
  div(
    .style %>%
      border("red") %>%
      float("left"),
    "Warning"
  ),
  div(
    "Nam a sapien.",
    "Phasellus neque orci, porta a, aliquet quis, semper a, massa.",
    "Phasellus lacus."
  )
)

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