Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8743955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:46:02+00:00 2026-06-13T11:46:02+00:00

My website container has a width of 95%. I’m trying to create a navigation

  • 0

My website container has a width of 95%. I’m trying to create a navigation which spans the full width of my container. It works fine until I add the ‘position: fixed;’ to the navigation, it then just ignores the container and spills outside the container.

below is my CSS code and a link to a picture.

#page {
width: 95%;
max-width: 1440px;
height: auto;
margin-left: auto;
margin-right: auto;
border: solid 1px #000;
}

.nav {
width: 100%;
background-color: fuchsia;
height: 50px;
    position: fixed;
}

.nav ul {
list-style: none;

}

.nav ul li {
float: left;
display: block;
padding: 5px;
background-color: fuchsia;
line-height: 40px;
}

Image of problem… https://i.stack.imgur.com/gjjSw.png

Thanks for any help! It’s much appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:46:03+00:00Added an answer on June 13, 2026 at 11:46 am

    you are giving position:fixed which makes your navigation to come out of the parent div or element.

    Add something like this in your navigation element:

    .nav 
    {
      width:95%;      /*dont give width as 100% */
      margin:0 auto;  /* for center alignment purpose */
      background-color: fuchsia;
      height: 50px;      
      position: fixed;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a container div called #container which has a bunch of .inside
My website has the typical container that is centered in the middle (very similar
I am trying to do a little optimization on my website and it has
I am trying to create a table for a website that is a fixed
So basically the website I'm designing has 3 divs inside a container div. One
I've been trying to add a header to my website, but I cannot get
I am trying to create a website the is contained of 8 divs. each
I have a picture on my website which has to much space beneath a
This is my code : <div class=container> <a class=link href=http://www.website.com>My Link</a> </div> .container {
I have a website which contains a large (and wide) table. The table is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.