1

I'm attempting to make tableOutput's fonts larger. I look for examples, try to apply the answer to my code, but it doesn't work.

My code :

mainPanel(span(tableOutput('tabledata'), style = "font-size:80%"))

mainPanel(span(tableOutput('tabledata'), style = "font-size:8px"))

mainPanel(span(tableOutput('tabledata'), style = "font-size:8.0pt"))

However, when I tried to modify the color. It does work.

mainPanel(span(tableOutput('tabledata'), style = "color:white"))

What did I do wrong ?

stefan
  • 90,330
  • 6
  • 25
  • 51
M3U
  • 11
  • 1
  • 1
    Welcome to SO! All options work fine for me. Perhaps you could provide [a minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with a minimal and working shiny app. – stefan Oct 25 '22 at 11:14

1 Answers1

0

Try this:

div(tableOutput("tableName"), style = "font-size:80%")

KacZdr
  • 1,267
  • 3
  • 8
  • 23
  • Thank you for your answer, but the output is unchanged. – M3U Oct 26 '22 at 02:28
  • It works for me, if u need better help provide a minimal reproducible of your code like it was said in the comment section. – KacZdr Oct 26 '22 at 04:17
  • I apologize, but I'm aware of the issue because I'm using theme = shinytheme ("superhero"). It doesn't works when I adjust the font size in tableOutput. However, when I adjust the font size of tableOutput using theme = shinytheme("united"), it works. more questions The font size can't be changed for the theme superhero , right? I practice understanding shiny using this github. https://github.com/dataprofessor/code/blob/master/shiny/003-play-golf/app.R – M3U Oct 26 '22 at 05:15