title: Center leaflet in a rmarkdown document
body: <p>I want to create an html document with a centered leaflet widget inside it. </p>
  
  <pre><code>---
  title: "Exemple"
  author: "Antoine Bichat"
  date: "31/08/2018"
  output: html_document
  ---
  
  ```{r leaflet, fig.align="center"}
  library(leaflet)
  
  leaflet() %&gt;%
    addTiles() %&gt;% 
    addMarkers(lng=174.768, lat=-36.852, popup="The birthplace of R")
  ```
  </code></pre>
  
  <p>The first idea with <code>fig.align="center"</code> doesn't work.</p>
  
  <p>I found this <a href="https://stackoverflow.com/questions/44458961/html-widgets-alignment-in-rmarkdwon">question</a> and I adapted it to my case:</p>
  
  <pre><code>&lt;style&gt;
  /* resize the widget container */
  .leaflet { 
    width: 80% !important;
  }
  
  /* center the widget */
  div.leaflet-control-container {
    margin: auto !important;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>but if I don't want to have an <code>out.width</code> of 100% (and I don't want to), it doesn't work.</p>
  
  <p>Or maybe I did it wrong... 
  Actually I prefer a 100% <code>R</code>/<code>Rmarkdown</code> solution but I'm open to everything :)</p>