selectInput
answer
column
的和
align = "right"
我能得到我想要的。问题是文本和选择箭头也是右对齐的,这看起来很糟糕(参见下面的图片和突出显示区域)。
library(tidyverse) # loaded for the words data.frame
library(shiny)
ui <- fluidPage(
navbarPage(
set.seed(1233),
fluidRow(
column(8,radioButtons("plot", "", choices = list("Cluster"="1","Correlation"="2"), inline=T)),
column(4, align = "right",
div(style="display: inline-block;vertical-align:top; width: 120px;",
selectInput("Something","Something", choices = sample(words, 5))),
div(style="display: inline-block;vertical-align:top; width: 120px;",
selectInput("Else","else", choices = sample(words, 6))))
)
)
)
server <- function(input, output) {}
shinyApp(ui, server)