我有3个输入控件,并且想在一个闪亮的应用程序中将一个控件对齐到页面的左侧。此外,两个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)
答案 0 :(得分:0)
我无法为您提供最佳对齐方式建议,但是在这种情况下,您可以添加
text-align:left !important;
设置为您的样式参数