tirdod
tirdod

Reputation: 33

HTML Table Isn't Using Bootstrap Formatting As Per kableExtra

I would like to create a striped html table. As you can see in this picture, it is not formatting as desired. Any tips on how to fix this?

EDIT: I think it has something to do with the doc setup - as at one point it was coming out with the stripes. I'm not sure what change I made that caused the problem

---
title: "Creating a Draft Pick Value Chart"
author: "Tirdod Behbehani"
date: July 5, 2021
output: 
  html_document:
    keep_md: true
always_allow_html: true
tables: true
---

```r
library(knitr)
library(kableExtra)

knitr::kable(list(round1, round2), 
             caption = "NBA Draft Pick Value Table",
             col.names = c("Pick Number", "Pick Value"),
             format = 'html') %>%
  kable_styling(bootstrap_options = "striped", full_width = FALSE, position="left")
```

Upvotes: 0

Views: 396

Answers (1)

tirdod
tirdod

Reputation: 33

When I use output: rmarkdown::github_document and always_allow_html: true the stripes from kable_styling() show up. Thank you!

Upvotes: 1

Related Questions