I saw some answers for html, but non of them worked for my Rmarkdown.
My goal is to make the sidebar float next to the centered main
section while using rmdformats
. Or just that sidebar + main are centered.
Requires package rmdformats
With my current files, sidebar remains fixed on the left side, despite the fact that my code should center "content"
.Rmd file:
---
title: "my title"
date: "`r Sys.Date()`"
output:
rmdformats::readthedown:
highlight: kate
---
<link rel="stylesheet" href="mystyle.css"> # css tested in yaml also
mystyle.css :
#content {
margin: 300 auto;
max-width: 800px;
}
@media (min-width: 1400px) {
#content {
width: 1100px;
margin: 0 auto;
}
}
Note: I know that common Rmarkdown mimics a sidebar, next to main.