html - Positioning the text within Action Button in R shiny -


i want fit resource activity text within given button such activity comes below resource in button. complete word gets hidden because of less space of button , not want increase space. please help.

## app.r ## library(shiny) library(shinydashboard)  ui <- dashboardpage( dashboardheader(), dashboardsidebar(), dashboardbody(  actionbutton("buttonresinvthree", "resource activity",style="color:  #000000; width:8%; ") ) ) server <- function(input, output) { } shinyapp(ui, server) 

snapshot of button

the following works me:

## app.r ## library(shiny) library(shinydashboard) library(tablehtml)  ui <- dashboardpage(   dashboardheader(),  dashboardsidebar(),  dashboardbody(   tags$head(tags$style(make_css(list('.btn', 'white-space', 'pre-wrap')))),   actionbutton("buttonresinvthree", html("resource\nactivity"),                style="color: #000000; width:8%; ")  ) )  server <- function(input, output) { }  shinyapp(ui, server) 

i added tags$head... add css button (class btn) , used \n break line between resource\nactivity.

the result looks this:

enter image description here


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -