Is there a way to align certain tabPanels
to the right and others to the left within a navbarPage
in Shiny?
For example, instead of the default alignment like this:
library(shiny)
ui = tagList(
navbarPage(
title = "My app",
navbarMenu("Left1",
tabPanel("Subleft11"),
tabPanel("Subleft12")),
tabPanel("Left2"),
tabPanel("Left3"),
tabPanel("Right1"),
tabPanel("Right2")
)
)
server <- function(input, output, session) {}
shinyApp(ui, server)
I am looking for an output similar to this:
https://i.sstatic.net/wTJFG.png
Although I found a solution on Stack Overflow by user GyD for tabsetPanel
, I have been unable to apply it to navbarPage
. I attempted to add the following CSS code:
tags$head(
tags$style(HTML(
".navbar ul li:nth-child(4) { float: right; }
.navbar ul li:nth-child(5) { float: right; }"
))),
However, it did not produce the desired result.