Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205551

DT datatable transparent in Rmarkdown html reports

$
0
0

I need a watermark on my html output Rmarkdown but it is masked by the datatables.

There might be a simple answer but i don't know Javascript yet. Any tip?

I have tried using formatStyle but it doesn't work as expected:

datatable(mytable, escape = F, class = 'row-border hover compact') %>% 
  formatStyle(columns = names(mytable), backgroundColor = "#FFFFFF00")

I get my watermark with style.css:

.watermark {
  opacity: 0.2;
  position: fixed;
  top: 50%;
  left: 50%;
  font-size: 600%;
  color: #00407d;
}

and Rmarkdown header:

---
title: "PRAP Monitoring Indicators from 2015 to 2017 in one province of Viet Nam"
author: "Gael Sola / Hoàng Việt Anh"
date: "December 2019"
output:
  html_document: 
    highlight: pygments
    theme: "flatly"      # for: html_document black theme: darkly, white them: flatly
    toc: TRUE
    toc_float: TRUE       # for: html_document
    css: PRAP MS - markdown-styles.css
---

<div class="watermark">DRAFT</div>


Viewing all articles
Browse latest Browse all 205551

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>