i've got the following problem.
I have this page structure:
<body>
<nav></nav> // position absolute, width 300px
<main></main> // position relative, width 100%
</body>
The main element lays over the nav. I've got a jquery function to open the nav which pushes the main to the right. But the main element is going out of my body to nowhere instead of staying 100% width. This is quite logicaly because the body didn't change.
How can i structure my layout to achieve that the main element acts responsive to the changes?
Here is the jsfiddle: