Looking for assistance with centering the main content area on a webpage both vertically and horizontally.
After adding a CSS nav bar, scroll bars appeared on the page and the main div lost its center positioning, seeming to be shifted down and to the right by the nav bar. I want the main div to stay centrally positioned while the nav bar overlays everything else to avoid affecting the main div's placement.
Although I've tried adjusting the z-index values, it hasn't resolved the issue. Can anyone provide guidance on how to fix this correctly?
Thanks in advance!
(Just starting out and learning as I go!)