简体   繁体   中英

Set top/bottom margin for tabs in shiny tabsetPanel

Can anyone help with setting the top/bottom margin for the tabs in a tabsetPanel in shiny using CSS?

Here's an example code

library(shiny)
shinyApp(
 ui=shinyUI(
    fixedPage(
        tabsetPanel(
            tabPanel("Data Input",
                    fixedRow(
                        column(12,
                               h6("test"))
                    )
            )
        )
    )
)
,

server=shinyServer(function(input, output) {

 })

)

在此处输入图片说明

Maybe something like this. For more info see: Background color of tabs in shiny tabPanel

library(shiny)
shinyApp(
ui=shinyUI(
fixedPage(
  tabsetPanel(
    tabPanel("Data Input",
             tags$style(HTML("
              .tabbable > .nav > li > a {margin-top:50px;}")),
             fixedRow(
               column(12,
                      h6("test"))
             )
    )
  )
)
)
,

server=shinyServer(function(input, output) {

})
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM