Search code examples
cssrr-markdownthemes

Increase width of Rmarkdown theme 'readthedown'


I have a question about rmarkdown. I use this theme, 'readthedown' and I would like to increase the width of the page because I have a huge grey right panel which is not used. I tried something in a custom css like below but it does not work :

body .main-container {
  max-width: 1920px !important;
  width: 1920px !important;
}

body {
  max-width: 1920px !important;
}

I succeeded to reduce the width but not to increase. With goole inspector it seems that the size of the page is set to 900px !


Solution

  • You can increase the content width by declaring:

    ```{css}
    #content{
        max-width:1920px;
    }
    ```
    

    Default is max-width:900px;

    You can find the .css file in your library .libPaths() folder under rmdformats > templates > readthedown > readthedown.css. There you can search for "width".