Description Usage Arguments See Also Examples
Use float()
to float an element to the left or right side of its parent
element. A newspaper layout is a classic usage where an image is floated with
text wrapped around.
1 | float(tag, side)
|
tag |
A tag element. |
side |
A responsive argument. One of |
Other design utilities:
active()
,
affix()
,
background()
,
border()
,
display()
,
font()
,
height()
,
padding()
,
scroll()
,
shadow()
,
width()
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 | ### Newspaper layout
div(
div() %>%
width(5) %>%
height(5) %>%
margin(right = 2) %>%
background("amber") %>%
float("left"),
p(
"Fusce commodo. Nullam tempus. Nunc rutrum turpis sed pede.",
"Phasellus lacus. Cras placerat accumsan nulla.",
"Fusce sagittis, libero non molestie mollis, ",
"magna orci ultrices dolor, at vulputate neque nulla lacinia eros."
),
p(
"Nulla facilisis, risus a rhoncus fermentum, tellus tellus",
"lacinia purus, et dictum nunc justo sit amet elit."
),
p(
"Proin neque massa, cursus ut, gravida ut, lobortis eget, lacus.",
"Aliquam posuere.",
"Sed id ligula quis est convallis tempor."
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.