html - 底部对齐 R shiny 中的按钮

标签 html css r shiny fluid-layout

我想不出一种方法将 downloadButtonselectizeInput 底部对齐,即,

enter image description here

library(shiny)

runApp(list(
  ui = shinyUI(fluidPage(
    fluidRow(align="bottom",
      column(12, align="bottom",
             h4("Download Options:"),
             fluidRow(align="bottom", 
                      column(6, selectizeInput("plot_dl", "File Type", width="100%",  
                                               choices = list("PDF"="pdf","PNG"="png"))),
                      column(3, downloadButton('plot1_dl', 'Left Plot')),
                      column(3, downloadButton('plot2_dl', 'Right Plot'))
             )
      )
    ),
    tags$style(type='text/css', "#plot1_dl { width:100%; vertical-align:bottom}"),
    tags$style(type='text/css', "#plot2_dl { width:100%;}")
  )),
  server = function(input, output) {
  }
))

在任何地方放置 align="bottom" 都不会抛出错误消息,但也没有达到预期的效果。尝试使用按钮的样式标签,但超出了我的理解范围。

最佳答案

在样式标签中找到了一个带有 margin-top: 25px 的临时修复...

enter image description here

library(shiny)

runApp(list(
  ui = shinyUI(fluidPage(
     h4("Download Options:"),
     fluidRow(
       column(6, selectizeInput("plot_dl", "File Type", width="100%",
                                choices = list("PDF"="pdf","PNG"="png"))),
       column(3, downloadButton('plot1_dl', 'Left Plot')),
       column(3, downloadButton('plot2_dl', 'Right Plot'))
     ),
     tags$style(type='text/css', "#plot1_dl { width:100%; margin-top: 25px;}"),
     tags$style(type='text/css', "#plot2_dl { width:100%; margin-top: 25px;}")
  )),
  server = function(input, output) {
  }
))

关于html - 底部对齐 R shiny 中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28960189/

相关文章:

javascript - contenteditable div - 在 span 中包装文本并设置样式而不影响新添加的文本

javascript - 无法从 PHP 获取值到 Javascript

PHP/MySQL - 页面/排序加载缓慢

html - 创建一个垂直的 HTML/CSS 菜单,我想删除 <li> 顶部填充(在 FF 和 IE 中显示)

r - 将数据表导出到 R 中的 Google Maps KML

r - 在 Windows 上的 RMarkdown 中执行 bash (Git-Bash)

jquery - CSS 导航菜单在悬停时移动

php - 在新的 Wordpress 博客上从单独的计算机访问时主题不工作

css - 在 IE8 上单击 AlphaImageLoader 背景中包含的元素

r - pretty-print 数据框时如何增加列之间的空间?