Format headers so it aligns with main app title

Hello there,

I am brand new to Shiny (two years experience in R Studio), and I want for my fluidRow() headers to have some space between the confines of the app window, similar to the way the title is shown below.

For example, I would like "Upload Data" to have the same alignment as "Microcystin Concentrations from ELISA using 5 PL Curve." I have tried adding spaces to the text itself, but it didn't work.

Is there a way to move the header so that it sits in the same alignment as the main app title?

library(shiny)

ui <- fluidPage(
  titlePanel("Microcystin Concentrations from ELISA using 5 PL Curve"),
  fluidRow(
    h4("Upload Data")),
    column(10,
           fileInput("file", "Choose CSV File",
                     multiple = F,
                     accept = c("text/csv",
                                "text/comma-separated-values,text/plain",
                                ".csv"),
                     placeholder = "CSV files only",
                     width = "100%"))),
  fluidRow(
    h4("Preview Data"),
    column(10,
           numericInput("n", "Rows to Preview", value = 5, min=1, step = 1))),
  
  fluidRow(
    column(10,
           tableOutput("contents"))),
  
  fluidRow(
    h4("Standards"),
    column(12,
           tableOutput("standards"))
  )
)


server <- function(input, output, session) {
  
  data <- reactive({
    req(input$file)
    read.csv(input$file$datapath)
  })
  
  stds <- reactive({
    data() %>%
      filter(Type == "Standard")
  })
  
  output$contents <- renderTable({
    
    head(data(), input$n)
  })
  
  output$standards <- renderTable({
    print(stds())
  })
  
}

shinyApp(ui, server)

Thank you so much for any help!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.