Html R Shining-垂直对齐标签并以水平形式输入
我试图以水平形式垂直对齐输入及其标签。我不确定是否可以垂直对齐不同高度的内嵌div 下面的代码为我提供了以下信息: 我希望标签与输入对齐Html R Shining-垂直对齐标签并以水平形式输入,html,css,r,shiny,Html,Css,R,Shiny,我试图以水平形式垂直对齐输入及其标签。我不确定是否可以垂直对齐不同高度的内嵌div 下面的代码为我提供了以下信息: 我希望标签与输入对齐 library(shiny) library(shinyWidgets) library(shinydashboard) ui <- fluidPage( column(width = 8, tabBox(width = 12, tabPanel( 'Items', fluidRo
library(shiny)
library(shinyWidgets)
library(shinydashboard)
ui <- fluidPage(
column(width = 8,
tabBox(width = 12,
tabPanel(
'Items',
fluidRow(
style = 'margin:2px',
wellPanel(
tags$form(class = 'form-horizontal',
tags$b('Filter items'),
tags$div(
class = 'form-group',
tags$label(class = "col-sm-3 control-label", `for` = 'type', "By type:"),
column(
width = 9,
pickerInput(
inputId = 'type', label = '',
choices = character(0),
multiple = T
))),
tags$div(
class = 'form-group',
tags$label(class = "col-sm-3 control-label", `for` = 'name', "By name:"),
column(
width = 9,
searchInput(
inputId = 'name', label = '',
placeholder = "Search by name",
btnSearch = icon("search"),
btnReset = icon("remove")
))
)
)
)
)
)
)
) #/column 8
)
server <- function(input, output, session) {}
shinyApp(ui, server)
库(闪亮)
图书馆(shinyWidgets)
图书馆(shinydashboard)
ui也许只需将选项卡面板排列为多个流体行和
在这些里面,用列来排列你喜欢的东西
#
#
library(shinydashboard)
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
tabBox(
tabPanel(title = "Items",
wellPanel(
fluidRow(column(width = 12,"Filter Items")),
br(),
fluidRow(
column(width = 3,"By Type: "),
column(width = 9,
pickerInput(inputId = "choices.type",
choices = character(0),
multiple = TRUE))
),
fluidRow(
column(width = 3,"By Name: "),
column(width = 9,
searchInput(inputId = "seach.name",
placeholder = "Search",
btnSearch = icon("search"),
btnReset = icon("remove")))
)
)
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
#
#
图书馆(shinydashboard)
图书馆(闪亮)
图书馆(shinyWidgets)
ui感谢Andreé,我确实想过使用column()
,但我想看看是否可以使用form horizontal
。对于后者,我必须在标签标签内添加一个换行符,使其与输入对齐,但这似乎是一个黑客解决方案,所以我想在这里提问。