Hi!
I'm traying to put the text of a textOutput in front of an image to simulate that the image has a counter.
like this
This is my code so far
library(shiny)
# Define UI
ui <- fluidPage(
# Application title
titlePanel("Count"),
# Sidebar
sidebarLayout(
sidebarPanel(
textInput("txt", "Enter the text to display below:")
),
# Show an image with a counter
mainPanel(
fluidRow(
column(
12,
div(
img(
src = "copa.jpg", # any image
height = 100,
width = 100,
style = "
margin-left:36%;
display: inline-block;
position: relative;
"
),
span(textOutput("default"),
style = "
position: absolute;
color: orange;"
)
)
)
)
)
)
)
# Define server logic required to draw a histogram
server <- function(input, output) {
output$default <- renderText({
input$txt
})
}
# Run the application
shinyApp(ui = ui, server = server)
I did some research in internet and I found that having position "absolut" and "relative" should be working but its not happening.
goblet image if needed it
Thank you in advance for your help!