# NOT RUN {
### Numeric values
# When specifying a numeric value the width of the element is relative to the
# default font size of the page.
div(
lapply(
1:20,
width,
tag = div() %>%
border("black") %>%
height(4)
)
) %>%
flex(
direction = "column",
justify = "between"
)
### Fractional values
# When specifying width as a fraction the element's width is a percentage of
# its parent's width.
div() %>%
margin(b = 3) %>%
background("red") %>%
height(5) %>%
width("1/3") # <-
# }
Run the code above in your browser using DataLab