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 7003063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:00:45+00:00 2026-05-27T21:00:45+00:00

I decided to make my navigation links a styled-up <ul> . How can I

  • 0

I decided to make my navigation links a styled-up <ul>. How can I make the width of each <li> expand so that they cover the entire <ul>, i.e. the first one starts at left:0 and the last one ends at right:0?

How it looks at lower resolutions is not impor>tant. The red border is the <ul>, the blue one the surrounding <div>.

enter image description here

This is my current code:

div.nav_container {
    width:960px;
}
ul.nav {
    position:relative;
    list-style:none;
    padding-bottom: 10px;
    width:100%;
    border:1px solid red;
}
ul.nav li {
    margin:0 10px; padding:0;
    text-align:center;
    position:relative;
    float:left;
    width:13%;
    background-color:white;
    border:1px solid black;
}
  • 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-05-27T21:00:46+00:00Added an answer on May 27, 2026 at 9:00 pm
    ul.nav li {
    margin:0; padding:0;
    text-align:center;
    position:relative;
    display: inline-block;
    width: 158px;
    background-color:white;
    border:1px solid black;
    }
    

    Width of nav container (960px) divided by number of list items (6) = 160px minus 2px for border (1px each side) = li width of 158px.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why is it that they decided to make String immutable in Java and .NET
So I am currently learning C++ and decided to make a program that tests
I'm having a problem that's intriguing me. I decided make a few changes (in
One of my non-programmer friends recently decided to make a C++ program to solve
For my first project in flash I decided to make a little football game.
I'm messing around with SDL, and I decided to make a program that opens
I decided to make a system for a client using Castle ActiveRecord , everything
Ok this time I decided to make a list using the STL. I need
I am developing an ASP.NET Ajax form, and decided to make most of the
My marketing department, bless them, has decided to make a sweepstakes where people enter

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.