How to vertically center a inside a div? [duplicate]

This question already has answers here: How to center an element horizontally and vertically (26 answers) Closed 7 years ago. The code: <div id=”theMainDiv” style=” border:solid 1px gray; cursor:text; width:400px; padding:0px;” > <span id=”tag1_outer” style=” background:#e2e6f0; padding-right:4px; padding-left:4px; border:solid 1px #9daccc; font:normal 11px arial; color:#3c3c3c” >as</span> </div> As it renders now, the span is align … Read more

Center Plot title in ggplot2

This simple code (and all my scripts from this morning) has started giving me an off center title in ggplot2: Ubuntu version: 16.04 R studio version: Version 0.99.896 R version: 3.3.2 GGPLOT2 version: 2.2.0 I have freshly installed the above this morning to try and fix this… dat <- data.frame( time = factor(c(“Lunch”,”Dinner”), levels=c(“Lunch”,”Dinner”)), total_bill … Read more