Reputation: 1041
How can I fill out the entire length of the browser window? While width="100%"
seems to work fine height="100%"
seems to fill out a frame which is invisible to me.
library(shiny)
ui <- fillPage(
htmlOutput("frame")
)
server <- function(input, output) {
output$frame <- renderUI({
tags$iframe(src="https://stackoverflow.com/", height="100%", width="100%")
})
}
shinyApp(ui, server)
Upvotes: 4
Views: 1697
Reputation: 7689
You can adapt the height of the iframe with the style
argument. For some reaseon setting it to height:100%
does not work, but setting it to height:100vh
does (viewport height)
library(shiny)
ui <- fillPage(
htmlOutput("frame")
)
server <- function(input, output) {
output$frame <- renderUI({
tags$iframe(src="https://stackoverflow.com/", style='width:100vw;height:100vh;')
})
}
shinyApp(ui, server)
Upvotes: 8