闪亮的R对齐按钮 [英] Shiny R aligning buttons

查看:98
本文介绍了闪亮的R对齐按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的U.i文件中有两个按钮

I have two buttons in my U.i file

div(style="display:inline-block",submitButton("Analysis")),
  div(style="display:inline-block",downloadButton('downloadData', 'Download Data'))

哪个在应用程序中提供以下输出

Which gives the following output in the app

但是,我试图对齐这些按钮,以使下载数据位于灰色框中的右侧,而分析按钮位于灰色框中的左侧,而不是现在的外观.我该怎么办?预期的用途是变得更高级,并在灰色框的中间创建另一个按钮.我假设您做的事情类似于

However I am trying to align these buttons so that the download data is on the right in the grey box and the analysis button is on the left in the grey box, instead of how it looks now. How do i go about this? The intended use is to become more advanced and create another button which is in the middle of the grey box. Im assuming you do something similar to

style="display:center-align"
style="display:right-align"
style="display:left-align"

但是我不确定如何执行此过程.

but I'm not sure how to go about this process.

推荐答案

这有效:

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

But you should consider using a stylesheet, like explained in this answer: https://stackoverflow.com/a/25390164/1117932

这篇关于闪亮的R对齐按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆