I am creating a fixed navbar with a position in the middle of the page. I want to create it so when you minimize the browser it does not overlap the body of the page.
I tried using this code
but it seems to be not working. Any suggestions?
I tried using this code
- Code:
$(window).scroll(function(event) {
$("#pun-navlinks").css("margin-left", $("#pun-navlinks").css("margin-left")-$(document).scrollLeft());
});
but it seems to be not working. Any suggestions?