margin_all | R Documentation |
The margin_*()
functions adjust a tag element's margin, the space outside
and around the element, its border, and its content.
margin_all(x, ...)
margin_top(x, ...)
margin_right(x, ...)
margin_bottom(x, ...)
margin_left(x, ...)
margin_horizontal(x, ...)
margin_vertical(x, ...)
x |
A tag element or .style pronoun. |
... |
A number or character string specifying a margin. One or more of,
|
An object of the same type as x
.
gap_all()
for flex spacing.
library(htmltools)
div(
.style %>%
margin_left(3) %>%
margin_right(3),
"Left margin, right margin"
)
div(
.style %>%
margin_horizontal(3),
"Shorthand for left and right margins"
)
div(
.style %>%
margin_horizontal("auto"),
"A centered element."
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.