I have a shiny app with a logo right-aligned in the titlePanel, and another logo right-aligned in the "footer". I want to have both images in the same size and I want them both right-aligned to the same "vertical line".
library(shiny)
library(shinythemes)
shinyApp(
ui <- fluidPage(
theme = shinytheme("simplex"),
titlePanel(
div("Fancy Title",
actionLink(inputId = "gitLab",
label = tags$img(src = "logo_1.svg", width = "40px", height = "40px"),
style = "background-size:cover; background-position:center; position:absolute;right:2em",
onclick = "window.open('https://github.com/')")
)
), # end titlePanel
hr(),
div(
width = 10,
a(href = "https://www.rcsb.org/", "Whatever", target="_blank"),
actionLink(inputId = "ABC",
label = tags$img(src = "logo_2.svg", width = "40px", height = "40px"),
style = "background-size:cover; background-position:center; position:absolute;right:2em",
onclick = "window.open('https://www.rcsb.org/')")
),
br()
), # end fluidPage
server = function(input, output, session){}
) # end shinyApp
So far, I can't manage to align them to the right, so that they both have the same "x-coordinates". Help!