Issues with fixing a side navigation bar while still keeping within normal document flow

I don’t understand why you’re using flexbox , you should have both the elements inside a single tag to use flexbox and align them next to each other using row or in a column one below the other and setting the width,

now for you problem you can set margin-left to 400px and the main will align next to the navbar

  width: 100%;
 max-width: 1920px;
 border: 2px solid green;
 height: 100%;
-> this margin-left:405px;
}```

[Flexbox MDN check this out it would be helpful in your project if you re planning to use flexbox ](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox)
1 Like