I am trying to create an interactive database for recipes in Shiny to provide an easy way to search my books. I have a functioning table with controls which works and looks good whenever running either within VS Code or RStudio, but whenever I publish it to ShinyApps.io it only occupies a tiny portion of the screen:
I've tried including a style.css file with this information:
/***CONTAINER SIZING***/
.main-container{
margin-left: 0px !important;
margin-right: 0px !important;
max-width: 99% !important;
/* overflow-y: visible !important; */
/* height: 1000px !important; */
/* margin-top: 0px !important; */
/* margin-bottom: 0px !important; */
/* max-height: 99% !important; */
/* min-height: 99% !important; */
}
I've tried various combinations of the commented out lines to no effect, but the top 3 lines have made it fill it widthways.
I also tried running this code I found of someone seemingly having a similar problem, but it has the same issue; fills only a tiny box in the window. The picture is me trying it with my table, but it has the same issue unmodified.
Is there something I'm missing? I'm not sure what else to try at this point.
CodePudding user response:
You can try this
shinyApp(ui, server, options = list(height = 1300))
In answer to your comment, I am not entirely sure.. sorry. You might be able to try wrapping the entire app within the bounds of a div. You can mess around with the specific width and height parameters.
<div style="width:1000px;height:1300px">
{r}
Your code.....
shinyApp(ui, server)
</div>