css - Shiny Dashboard: Sticky Footer in dashboardSidebar -
i trying build shiny dashboard footer in dashboardsidebar
, sticky bottom of viewport. this, trying use custom css styling suggested here (one of many search results when googling "footer bottom bootstrap") :
# create example question on sticky footer library(shiny) library(shinydashboard) # sidebar so_sidebar = dashboardsidebar( sidebarmenu( menuitem( text = "some text." ) ), # footer here tags$footer( tags$p("footer message here."), style = " * { margin: 0; } html, body { height: 100%; } .wrapper { min-height: 100%; height: auto !important; /* line , next line not necessary unless need ie6 support */ height: 100%; margin: 0 auto -155px; /* bottom margin negative value of footer's height */ } .footer, .push { height: 155px; /* .push must same height .footer */ } /* sticky footer ryan fait http://ryanfait.com/ */" ) ) # compose dashboard so_ui = dashboardpage( header = dashboardheader( title = "so question" ), sidebar = so_sidebar, body = dashboardbody() ) # run application shiny::shinyapp( ui = so_ui, server = shinyserver(function(input, output) {}) )
since have never worked custom css before, not sure using css right. following instructions here.
can getting css right, or other suggestions on footer sticky bottom of viewable area in sidebar of shiny dashboard?
try this
<div> sticky footer </div> div{ position:fixed; bottom:0; right:0; left:0; background:#00adfc; padding:10px; box-sizing:border-box; }
position fixed stay @ specified position , gives sticky feel.
Comments
Post a Comment