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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:49:02+00:00 2026-05-25T02:49:02+00:00

I tried to make tabs using CSS3 and got the following result: With the

  • 0

I tried to make tabs using CSS3 and got the following result:
enter image description here

With the following code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
nav{
    width:1000px;
    padding-top:30px;
    margin:0 auto 0 auto;
}
nav ul.topnav{
    margin:0;
    padding:0;
    width:100%;
    position:relative;
}
nav ul.topnav li{
    display:inline-block;
    width:173px;
    height:18px;
    padding:10px;
    font-size:15px;
    margin:0;
    box-shadow:inset 0 0 5px 5px #E7E4E9;
    border:1px solid #8C8293;
    border-radius:15px;
    border-bottom-left-radius:0;
    border-bottom-right-radius:0;
    color:#666666;
    text-align:center;
}
</style>
<title></title>
</head>
<body>
<nav>
<ul class="topnav">
<li>Overview</li>
<li>Alarms</li>
<li class="selected">Config</li>
<li>Logs</li>
<li>Command Line</li>
</ul>
</nav>
</body>
</html>

How can I remove that space between the tabs (as shown in the image)?
PS. It seems to be a trailing space because at the end of the list I have this space as well.

  • 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-25T02:49:03+00:00Added an answer on May 25, 2026 at 2:49 am

    The spaces are actually the newlines (whitespace) between your <li> tags. Since you made your <li>s inline blocks, the whitespace is treated as text on the same line as your inline blocks, causing them to be spaced apart.

    You can either remove the newlines from your HTML, or float your <li>s instead of using display: inline-block:

    nav ul.topnav li {
        float: left;
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to make a simple contact form via HTML and PHP but the
I've tried to make a regex expression to match a piece of code, but
as mentioned above I tried to make Ajax Tabs with the provided jQuery .ajax()
I am trying to make some tabs with the Jquery ui. My html looks
I'm starting using XCode4 and when I tried to make new project with tab
I've tried using the following: (setq-default tab-width 4) (setq-default tab-stop-list (list 4 8 12
Tried to make a little old school ajax (iframe-javascript) script. A bit of mootools
I tried to make the title as clear as possible... here is my scenario:
I tried to make an independent copy of an array but couldnt get one.
I tried to make a custom pushpin for the Bing Maps silverlight control, but

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.