I have 2 divs in my electron app. One on the left, with a fixed width, acting as a navigation menu. The other one is supposed to display content depending on which itme in the nav is clicked. For this right div I try to use flex: 1; in css to make it take up the remaining space in my wrapper div. In my jsfiddle (https://jsfiddle.net/bhL8t7ny/) this worked perfectly fine. But of course in electron it didn't. I can't seem to find a valid fix though.
My html looks like this:
<body>
<div class="wrapper">
<div class="sidebar">
<div class="imgdiv">
<img src="assets/icons/1x/logo_orange.png">
</div>
<div class="nav">
<ul>
<li><a id="dashboard" href="#">Dashboard</a></li>
<li><a id="tasks" href="#">Tasks</a></li>
<li><a id="profiles" href="#">Profiles</a></li>
</ul>
</div>
</div>
<div id="content"></div>
</div>
<script src="../renderer.js"></script>
<script src="assets/js/navigation.js"></script>
</body>
And css is as follows:
.wrapper {
width: 100%;
height: 100%;
display: flex;
overflow: hidden;
}
.sidebar {
width: 150px;
height: 100%;
background: #080808;
display: flex;
flex-direction: column;
justify-content: center;
}
.content {
flex: 1;
background: #141414;
}
I can't spot my mistake, this is exactly in line with what I used to test this out in the jsfiddle. Anyone know what's going wrong here?
Appreciate any help!