I am using knitr
to create a HTML webpage. The default setting seems to be 800px but I need a larger page size of 1100px
body {
max-width: 800px;
margin: auto;
padding: 1em;
line-height: 20px ;
}
I have tried:
library("markdown")
library("knitr")
knit2html("test.Rmd",options = c(width=1100))
But this still gives me the smaller page size of 800px
How can I set the code for the HTML page width?
Add a css
element to your document, e.g.
---
title: "test"
output:
html_document:
css: "test.css"
---
and then put your new css information in that file, e.g.
body {
max-width: 1100px;
margin: auto;
padding: 1em;
line-height: 20px ;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With