Justify the text in R shiny

Hi there!I am here to ask if anyone know about justify the text of a shinyapp.io aplication. First I show you what I have and what I want and I Will give you my code:

I would like to put this text to the final. I tried something I found On internet, but I dont know how to use. I was:

#<div style="text-align: justify">
#<div/>

I show to you my User Interface codes:

#UI
library(shiny)

ui <- fluidPage(
    titlePanel(title = h1(strong("2.Ranking Countries"), align = "center")),
    sidebarLayout(
        sidebarPanel(
            selectInput("data", "1- Select the data you want to know:", choices = c("Confirmed", "Deaths", "Recovered"), selected = "Confirmed" ),
            br(),
            sliderInput("number", "2- Select the number of countries you want to rank:", min=10, max=189, value=15)           
        ),
        
        mainPanel(
            
            tabsetPanel(type="tab",
                        tabPanel("Summary", verbatimTextOutput("summary")),
                        tabPanel("Structure", verbatimTextOutput("str")),
                        tabPanel("Data", dataTableOutput("tab")),
                        tabPanel("Plot", 
                                 h3(strong("Ranking per countries affected by COVID-19")),
                                 p("This plot shows", strong("the ranking of 189 countries classified by the totals of the three variables we are analysing"),". First, you must choose", strong("the type of data you want to know(Confirmed, Deaths or Recovered by COVID-19)")," and after that,", strong("the number of countries you want to put in the plot.")),        
                                 p("Notice that when you increment the number of countries you cannot see the number label. So if you need to see it, go to the", strong("data tab")," and look for it."),**
                                 textOutput("obs"), 
                                 plotOutput("myplot")),
                                 p(h6("Last Update: May 11, 2020", align= "right")))         
        )
    )
    
)

add style="text-align: justify;" to the p tags you want to style
from :

p("This plot shows",
  strong("the ranking of 189 countries classified by the totals of the three variables we are analysing"),
  ". First, you must choose",
  strong("the type of data you want to know(Confirmed, Deaths or Recovered by COVID-19)"),
  " and after that,",
  strong("the number of countries you want to put in the plot."))       

to:

p(style="text-align: justify;",
  "This plot shows",
  strong("the ranking of 189 countries classified by the totals of the three variables we are analysing"),
  ". First, you must choose",
  strong("the type of data you want to know(Confirmed, Deaths or Recovered by COVID-19)"),
  " and after that,",
  strong("the number of countries you want to put in the plot."))

OMG thank you very much!!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.