daattali / shinyalert

🗯️ Easily create pretty popup messages (modals) in Shiny
https://daattali.com/shiny/shinyalert-demo/
Other
241 stars 26 forks source link

Positioning the confirm button on a shinyalert #62

Closed rlmoore0 closed 2 years ago

rlmoore0 commented 2 years ago

I'd like to re-position the confirm button in a shinyalert from the bottom of the modal to the top.

I was clued in that the name of the element can be referenced with css styling through .alert .confirm for example, say, to change the coloring of the button.

However, the positioning elements in css styling don't appear to work. Any suggestions?

daattali commented 2 years ago

There isn't any built in way to change positioning of the buttons, that's not a feature of sweetalert.

You're right that if you want to do this it would involve adding some custom CSS rules based on the DOM. I don't know off the top of my head the exact CSS classes that exist on the HTML elements, you'd have to use a browser DOM inspector to find that out and then experiment with the CSS rules to try to see if you can move the button to the top. This is purely an HTML/CSS question, it's out of scope for shinyalert, so I'm closing.