Apricot
Apricot

Reputation: 3011

shiny navbarpage title href color change from blue to white

How do i change the href'ed navbarpage title default color - in this case the stackoverflow is blue in color. How can I change it to white.

runApp(list(
  ui = navbarPage(inverse = TRUE,
    title=HTML("<a href=\"http://stackoverflow.com\">stackoverflow</a>"),
    tabPanel("tab1")
    ),
  server = function(input, output) { }
))

I figured I need to change the body link attribute and when I altered the code as follows:

tags$html(<body link="white">
<p><a href="http://www.stackoverflow.com">stackoverflow</a></p>
</body>)

I am getting errors as follows:

Error: unexpected '<' in "<"
Error: unexpected ')' in ")"

I checked the code, for every opening < there is a closing /> in html and for every ( there is a closing ).

How do I change the color of the font?

Upvotes: 0

Views: 788

Answers (1)

Eduardo Bergel
Eduardo Bergel

Reputation: 2775

Is this what you want?

runApp(list(
  ui = navbarPage(inverse = TRUE,
    title=HTML("<a style=color:white;  href=\"http://stackoverflow.com\">stackoverflow</a>"),
    tabPanel("tab1")
    ),
  server = function(input, output) { }
))

Upvotes: 2

Related Questions