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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:29:01+00:00 2026-06-13T16:29:01+00:00

I am trying to build a simple CSS only navigation bar for my site.

  • 0

I am trying to build a simple CSS only navigation bar for my site. This is it working fine in modern browsers:

Nav in modern Browser

And this is my CSS:

#nav{
    width:496px;
    height:45px;
    float:right;
    background-color:#bee199;
    -moz-border-radius:3px;
    -webkit-border-radius:3px;
    border-radius:3px;
    margin-top:5px;
    border:1px solid #a09f9f;
    -moz-box-sizing:border-box;
    -webkit-box-sizing:border-box;
    box-sizing:border-box;
}
    #nav ul{
        list-style:none;
        text-align:center;
    }
    #nav ul .last{
        padding-right:0px;
        border-right:none;
    }
    #nav ul li.navsep{
        width:1px;
        height:44px;
        background-color:#a09f9f;
        padding:0;
        margin-right:10px;
    }
        #nav ul li{
            width:auto;
            height:44px;
            display: -moz-inline-stack;
            display:inline-block;
            padding-right:10px;
            margin-bottom:-16px;
        }
            #nav ul li a{
                font-family:Helvetica, Arial, sans-serif;
                font-size:20px;
                font-weight:400;
                text-decoration:none;
                color:#434342;
            }

HTML:

<div id="nav">
            <ul>
                <li><a href="principles.html" title="principles">Principles</a></li>
                <li class="navsep"><span></span></li>
                <li><a href="#edit" title="Our Services">Our services</a></li>
                <li class="navsep"><span></span></li>
                <li><a href="recent.html" title="Recent work">Recent work</a></li>
                <li class="navsep"><span></span></li>
                <li class="last"><a href="#edit" title="Contact Us">Contact</a></li>
            </ul>
</div>

One of my problems is using negative margins, I really don’t want to be using them. But every time I try to use conventional methods the text will not center vertically and it looks like this:

This also happens on older browsers.

Thanks for your time! If you need more information just ask! 🙂

Broken Nav

  • 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-13T16:29:02+00:00Added an answer on June 13, 2026 at 4:29 pm
    1. Omit the <li class="navsep"> and use borders instead.

    2. use lineheight on the li elements.

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

Sidebar

Related Questions

I'm trying to build a very simple pure css navigation bar, but have hit
I am trying to build this very simple (visually speaking) layout using HTML/CSS that
I'm trying to build a simple site but I'm just blocking on this weird
i am trying to build simple php crawler for this purpose i am getting
I am trying to build a simple vertical thermometer with CSS. I took some
sorry this may be a simple question. I am trying to build my first
I'm brand new to this and I'm trying build a simple layout of divs.
I've been trying to build a web site and I was using a CSS
I just started trying to build simple GUIs because I've always used command-line script
When trying to build a simple test program that uses atomic operations, I get

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.