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

  • Home
  • SEARCH
  • 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 6899877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:28:37+00:00 2026-05-27T07:28:37+00:00

I have a navigation bar/list that is using only HTML and CSS. The background

  • 0

I have a navigation bar/list that is using only HTML and CSS. The background image for the nav bar is 45px tall.

The list elements have been set with a CSS border-left property. I basically want to have a single vertical separator before each item in the list.

When I change the font in the list to around 30px the height of the border-left fills the 45px height of the div which is good. But when I set the size of the font smaller the border-left no longer fills the height of the div.

How can I set the font in the list small and yet still have the height of the border-left to 45px?

I have placed the code below. Thanks in advance

CSS:

#navbar{
    background-image: url('../images/navbar.png');
    color: white;
    font: 25px arial,sans-serif;
    height: 45px;
}
#navbar a{
    color: white;
    text-decoration: none;
}
#navbar ul{
    list-style: none;
    margin: 5;
    padding: 5;
}
#navbar li{
    border-left: solid 1px white;
    display: inline;
    padding: 1px 10px 1px 1px;  
    margin: 10px;
}   

HTML:

<div class="clear" id="navbar">
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">Start</a></li>
        <li><a href="#">In Jouw Regio</a></li>
    </ul>   
</div>  
  • 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-27T07:28:38+00:00Added an answer on May 27, 2026 at 7:28 am

    Here’s a solution:

    http://jsfiddle.net/bQe6W/1/

    I changed the following

    #navbar li {
        display: inline-block;
        line-height: 45px;
        margin: 0 10px;
    }
    

    Also set the background of the div to gray so you can see the example!

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

Sidebar

Related Questions

I have a navigation bar on my website. The HTML: <nav id=navigation> <a href=index.html>
Okay, so I'm writing CSS for a navigation bar that uses an un-ordered list
I have a navigation bar that is a list with multiple li naturally. On
I have a list of items with a plus button in the navigation bar
I have a navigation bar that has two dropdowns (as nested ul's). I'm trying
I have created a flexible navigation bar in my app that will show custom
I have my navigation bar using unordered links and using jquery for ui effects.
I have a very simple HTML layout where a vertical navigation bar should sit
I have a view that generates a dynamic navigation bar. Within Codeigniter, I just
I'm trying to get a navigation bar that consists of a nav with an

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.