# \donttest{
library(htmltools)
# If width is unspecified, equal widths will be used
bscols(
div(style = css(width="100%", height="400px", background_color="red")),
div(style = css(width="100%", height="400px", background_color="blue"))
)
# Use NA to absorb remaining width
bscols(widths = c(2, NA, NA),
div(style = css(width="100%", height="400px", background_color="red")),
div(style = css(width="100%", height="400px", background_color="blue")),
div(style = css(width="100%", height="400px", background_color="green"))
)
# Recycling widths
bscols(widths = c(2, 4),
div(style = css(width="100%", height="400px", background_color="red")),
div(style = css(width="100%", height="400px", background_color="blue")),
div(style = css(width="100%", height="400px", background_color="red")),
div(style = css(width="100%", height="400px", background_color="blue"))
)
# }
Run the code above in your browser using DataLab