R knitr markown: Setting HTML page width

后端 未结 1 869
执笔经年
执笔经年 2021-02-15 18:24

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         


        
1条回答
  •  名媛妹妹
    2021-02-15 18:57

    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 ; 
    }   
    

    0 讨论(0)
提交回复
热议问题