如何将tabsetPanel中可见的标签居中?目前我使用renderUI定义选项卡:
output$uiTabs <- renderUI({
tabsetPanel(tabPanel("visualization1",tableOutput("table1")),
tabPanel("visualization2",tableOutput("table2"))) })
然后在UI中我有这样的事情:
column(8,align="center",
uiOutput("uiTabs"))
现在表格中心对齐,但不是标签本身。
答案 0 :(得分:1)
以下是我们在OP的评论部分讨论的内容
#tabsetPanel holds all of the tabs
tabsetPanel(
#create an empty tab with white text being the label
#Inserting more text will increase the width of the label
tabPanel(tags$div(
HTML(paste(tags$span(style="color:white", "TYPE A LONG STRING HERE TO SPACE ACCORDINGLY"), sep = ""))
)),
#Other tabpanels
tabPanel("visualization1",tableOutput("table1")),
tabPanel("visualization2",tableOutput("table2")),
#Make sure to keep the selected = "tabPanel id" here because
#it will default select the empty panel
selected = "visualization1")