The decision on whether to use fixed or absolute navigation in your webpage design greatly depends on the type of page you are developing. Without seeing the full code, it's challenging to provide an accurate recommendation.
One classic approach is to enclose your page content within a container with a set width:
<div id="container">
<div id="mainnav">...</nav>
<div id="main-content">...</div>
</div>
CSS
#container
{
width: 1000px;
margin: 0 auto; // This will horizontally center your container within the webpage body and maintain its size even when the browser window is resized.
}
#mainnav
{
display : block;
}
This layout ensures that your navigation remains consistent with the content and does not change size. It also simplifies the management of elements within the navigation section.