Auto margins

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."
)


Try the cascadess package in your browser

Any scripts or data that you put into this service are public.

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