我的U.i文件中有两个按钮
div(style="display:inline-block",submitButton("Analysis")),
div(style="display:inline-block",downloadButton('downloadData', 'Download Data'))
这在应用程序中提供以下输出
但是我正在尝试对齐这些按钮,以便下载数据位于灰色框的右侧,分析按钮位于灰色框的左侧,而不是现在的样子。我该怎么做?预期用途是变得更先进并创建另一个位于灰色框中间的按钮。我假设你做了类似的事情
style="display:center-align"
style="display:right-align"
style="display:left-align"
但我不确定如何进行这个过程。
这有效:
div(style="display:inline-block",submitButton("Analysis"), style="float:right"),
div(style="display:inline-block",downloadButton('downloadData', 'Download Data'), style="float:right")
但是你应该考虑使用样式表,就像在这个答案中解释的那样:https://stackoverflow.com/a/25390164/1117932
你应该尝试使用fluidRow()
#example
library(shiny)
ui <- fluidPage(
fluidRow(
actionButton(inputId = "button01", label = "A"),
actionButton(inputId = "button02", label = "B"),
actionButton(inputId = "button03", label = "C")
)
)
server <- function(input, output, session){}
shinyApp(ui, server)