I am working on a project using rMarkdown and the flexdashboard package from rStudio. It works great. The only thing I'm struggling with is changing the orientation of the navigation bar. As the default, it appears at the top of the html file and I would like it to be on the left, with each button appearing horizontally. Is there a way to do this? Thanks for the input!
Asked
Active
Viewed 2,682 times
2 Answers
2
I tried something that seems to work (might probably be improved though, I am not a CSS specialist...)
---
title: "test"
output: flexdashboard::flex_dashboard
---
<style>
.navbar {
margin: 0;
padding: 0;
height: 100%;
display: block;
position: fixed;
width: 200px; /* Modify the width of the sidebar */
}
body {
margin-left: 200px; /* Add a left margin to avoid content overlay */
padding-top:0px
}
</style>

Daniel_j_iii
- 3,041
- 2
- 11
- 27

i94pxoe
- 577
- 3
- 11
1
You should be able to this, although not sure how. As you can hide the bar or change it's color, you should also be able to move it to the left editing the CSS/HTML code. Try editing the < styl e> < /style > and the float propierty of the navbar.
Another possibility is, if it's not a problem for you, you can also try ShinyDashboard whose main menu is at left.

Sergi Ballestar
- 101
- 7