Section 9.6.2 of the RMarkdown Cookbook does a great job introducing custom shaded boxes that will work with html and markdown.
:::: {.blackbox data-latex=""}
::: {.center data-latex=""}
**NOTICE!**
:::
Thank you for noticing this **new notice**! Your noticing it has been noted, and _will be reported to the authorities_!
::::
I'm using a tufte-style layout with margin notes. The example latex code for the preamble works as expected, but the css for the html version extends off the page.
.blackbox {
padding: 1em;
background: black;
color: white;
border: 2px solid orange;
border-radius: 10px;
}
.center {
text-align: center;
}
I added width: 55%
to .blackbox
and it adjusted the with appropriately, but the text alignment is off. I'd like the first line "CASE STUDY" to be centered and the body to be left justified and span the width of the box.