3

I am using RMarkdown to create a html document. I want to use a dropdown tabset, but I would like the dropdown menu to open up over the content of the tab, rather than pushing it down.

A minimal example is this:

---
title: "Untitled"
output: html_document
---

## R Markdown {.tabset .tabset-dropdown}

### Tab A
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

### Tab B
When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

When I knit that I get a page that looks like this

Closed dropdown menu

Which looks as I'd expect. But when you click the dropdown menu it pushes the content down rather than opening over it.

Open dropdown menu

Is there a way to prevent the menu from pushing down the content?

  • 1
    https://stackoverflow.com/questions/43956378/how-to-add-dropdown-menu-on-tab-tabset-rmarkdown-bootstrap – Thomas L. Feb 05 '20 at 12:41
  • I am sorry, but I don't understand that post. I am using the .tabset-dropdown in the accepted answer. The other answer mentions changing some html, but that bit of html appears to be generated by javascript in html document I get out. Could you help me understand what I need to change instead? – Adam Gaarslev Feb 05 '20 at 13:07

1 Answers1

2

I think it is a bug that has not been fixed yet.

Elaborating on my comment above: This was a proposed solution to your problem that does not seem to work anymore after an upgrade from Bootstrap 3 to 44.

Thomas L.
  • 524
  • 1
  • 5
  • 17