I've been trying to make my page contents be pushed to the right by 300px (the width of the side nav) when it is opened, as in this github repo here.
I have contained all the content to be pushed in a div #content.
However for some reason this is not impacting here:
function openNav() {
document.getElementById("Therightnav").style.width = "300px";
document.getElementById("content").style.marginRight = "300px";
}
function closeNav() {
document.getElementById("Therightnav").style.width = "0";
document.getElementById("content").style.marginRight = "50px";
}
Any help would be appreciated.