Is it possible to centre three images in one row within the shiny ui fluidPage AND have the width of each image fixed at 300px? To get:
One idea I had was t
Something like this?
rm(list = ls())
library(shiny)
server = function(input, output, session) {}
ui <- fluidPage(fluidRow(
#Change column(x, for desired width
column(6,
div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300)),
div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300)),
div(style="display: inline-block; width: 33%;",img(src="https://cran.r-project.org/Rlogo.svg", height=300, width=300))))
)
shinyApp(ui = ui, server = server)
I managed to fix it using the column function, I was simply missing the align="center"
argument paired with the removal of the width argument in the style. For example:
library(shiny)
server = function(input, output, session) {}
ui <- fluidPage(fluidRow(
column(12, align="center",
div(style="display: inline-block;",img(src="image1", height=300, width=300)),
div(style="display: inline-block;",img(src="image2", height=300, width=300)),
div(style="display: inline-block;",img(src="image3", height=300, width=300))))
)
shinyApp(ui = ui, server = server)