9

I have two buttons in my U.i file

 submitButton("Analysis"),width=6,downloadButton('downloadData', 'Download Data'))

Which gives the following output as the app

enter image description here

However I am trying to align these buttons so that the download data is right aligned and the analysis button is on the left, instead of how it looks now. How do i go about this?

zx8754
  • 46,390
  • 10
  • 104
  • 180
vik
  • 143
  • 2
  • 4

1 Answers1

7

You can do the following. Please look into shiny 4 small textInput boxes side-by-side also

library(shiny)

ui =fluidPage(
  div(style="display:inline-block",submitButton("Analysis"),width=6),
  div(style="display:inline-block",downloadButton('downloadData', 'Download Data'))
)
server = function(input, output, session){}
runApp(list(ui = ui, server = server))

enter image description here

Community
  • 1
  • 1
Pork Chop
  • 26,081
  • 5
  • 59
  • 70
  • I tried that way which does work better but the outcome is this - http://i.stack.imgur.com/T1wvC.png . I'm trying to get the button on the right side of they grey box and one on the left. I attempted to try this but it didn't work: "div(style="display:inline-block;right-align:". The results after all this is to add another button that is centre aligned but I'm finding this difficult. any ideas how to align the buttons? – vik Feb 25 '15 at 23:13