Should header/footer of "navbarPage" always be wrapped in "column"?

846 views
Skip to first unread message

Dean Attali

unread,
May 22, 2015, 8:15:00 PM5/22/15
to shiny-...@googlegroups.com
When using `navbarPage`, the header and footer are inserted inside an HTML "row". As a result of that, because bootstrap applies a -15px margin-left to rows, the header/footer content is misaligned with the content in tabs.
Bootstrap also says that "only columns may be immediate children of rows" (http://getbootstrap.com/css/#grid)

So I always wrap my header/footer arguments in a "column(12, ...)".  Since this seems to be mandatory, would it make sense to take care of that in shiny-core instead of us doing it manually? Or are there cases where it couldn't be right to auto-wrap the arguments in a column?

Example: the following is misaligned (and is "illegal" according to bootstrap")

runApp(shinyApp(
  ui = navbarPage(
    id = "test",
    title = "test",
    header = "this is a header",
    footer = "this is a footer",
    tabPanel("mytab", "this is a tab")
  ),
  server = function(input, output, session) {}
))

Replace footer/header with:

    header = column(12, "this is a header"),
    footer = column(12, "this is a footer"),


Reply all
Reply to author
Forward
0 new messages