title: Center align Shiny box header with HTML or CSS
body: <pre><code>    library(shiny)
      library(shinydashboard)
      filetime &lt;- format(file.mtime("mydata.csv"), format = "%a %e-%b-%Y %r IST")
  
      ui &lt;- dashboardPage(
        dashboardHeader(title = "Recruitment"),
        dashboardSidebar(),
        dashboardBody(
          shinyUI(fluidPage(
           box(verbatimTextOutput("final_text"), status = "primary", solidHeader = TRUE, collapsible = TRUE, width = 12, title = "Collapsable text")
      ))))
  
      server &lt;- shinyServer(function(input, output, session) {
        output$final_text &lt;- renderText({
          HTML(paste("&lt;center&gt;","Last updated at", filetime, "&lt;/center&gt;")) #"&lt;font size=\"2\"&gt;",
        })
      }
  </code></pre>
  
  <p>In the above code the <code>Last updated at and filetime</code> are not getting center aligned, upon further research I found that <code>center</code> tag does not work on HTML5, not sure if that's causing the problem.</p>
  
  <p>As a workaround, I added a <code>div and class</code> to center align the text via css, here is my 2nd attempt.</p>
  
  <pre><code>#Next to fluidPage
  tags$style(HTML(".man_made_class{color:#f2f205; text-align: center;}")),
  #Then further in Output
    output$final_text &lt;- renderText({
      HTML(paste("&lt;div class= man_made_class&gt;","Last updated at", filetime, "&lt;/div&gt;")) #"&lt;font size=\"2\"&gt;",
    })
  </code></pre>
  
  <p>In both my attepmt, I am able to change <code>color</code>, <code>font size</code>, <code>margin</code> etc, but not able to center align the text. Any help?</p>