Search code examples
rpresentationrpres

.Rpres (not rmarkdown) two-column layout not compatible in IE


Rpres (not remarkdown, e.g, ioslides_presentation) has a big advantage in two-column layout: ***. The feature works fine in Firefox and Chrome. E.g., the code below

First Slide
========================================================
For more details on authoring R presentations please visit 
<https://support.rstudio.com/hc/en-us/articles/200486468>.

- Bullet 1
- Bullet 2
- Bullet 3

***

```{r, fig.height=5}
plot(cars)
```

will create an html file. It looks great in Chrome54 in Chrome; but in IE11, the layout looks really weird. in IE

My platform is Win10.

> sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936  LC_CTYPE=Chinese (Simplified)_China.936   
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C                              
[5] LC_TIME=Chinese (Simplified)_China.936    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] R6_2.2.0     pbdZMQ_0.2-4 tools_3.3.2  knitr_1.15  

Can someone suggest how to improve it (modify css or so)? Thanks!


Solution

  • Well, I think I found a workaround. Create a .css file with following codes:

    .reveal .slides section .column { 
      position: absolute; 
      width: 48%; 
      top: 2.5em; 
      bottom: 0; 
      margin: auto; 
     } 
    

    and include it in the head YAML. The code is from the default css. I changed 'position' from 'fixed' to 'absolute'.