Description Usage Arguments Auto margins Examples
The margin()
function adjusts the outer spacing of a tag element. The
margin of a tag element is the space outside and around the tag element, its
border, and its content.
1 2 3 4 5 6 7 8 9 10 |
x |
A tag element or .style pronoun. |
all |
A responsive argument. One of |
top, right, bottom, left |
A responsive argument. One of |
horizontal |
A responsive argument. One of |
vertical |
A responsive argument. One of |
In most modern browsers you want to horizontally center a tag element
using the flex layout. Alternatively, you can horizontally center an
element using margin(.., horizontal = "auto")
.
div( .style %>% margin(v = 2, h = "auto") %>% # <- padding(3) %>% background("teal"), "Nam a sapien. Integer placerat tristique nisl." )
Nam a sapien. Integer placerat tristique nisl.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.