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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:06:58+00:00 2026-06-11T05:06:58+00:00

I want to center the text link in the div class .nav-tab I add

  • 0

I want to center the text link in the div class .nav-tab I add padding:0 auto; but it not help allso I add text-align:center; and still it is not work.
thanks for any help.

jsFiddle Demo

<nav id="main-nav-wrap">
<ul id="main-nav">
    <li class="">
        <div class="inner">
          <div class="nav-tab">

           <a href="/"> Home </a>
          </div>
             <div class="tooltip">
             </div>
        </div>
    </li>
            <li class="">
        <div class="inner">
            <div class="nav-tab">
            <a href="/"> abput</a>
            </div>
             <div class="tooltip">
             </div>
             </div>
    </li>
             <li class="">
        <div class="inner">
            <div class="nav-tab">
            <a href="/"> contact</a>
            </div>
             <div class="tooltip">
             </div> </div>
    </li>
        </ul>

​

    #main-nav-wrap {
    width:200px;
    height:60px;

    margin:50px 0 0 10px;
    padding:0;
    border:1px solid red;
}
#main-nav{
    width:196px;
    height:60px;
    top:50px;
    margin:0 ;
    padding:0;
    border:1px solid blue;
}
.inner{
    width:63px;
    height:58px;
      border:1px solid green;
    float:left;
}

.nav-tab{
     width:50px;
    height:58px;
    background-color: #BF87D1;
    margin:0 auto;
   }
.nav-tab a{
    vertical-align:-18px;

}
​
  • 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-11T05:07:00+00:00Added an answer on June 11, 2026 at 5:07 am

    First, understand that it’s not valid to define padding: 0 auto; — auto isn’t an acceptable value for padding. Adding text-align: center; to .nav-tab really seems to fix the issue: little link.

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

Sidebar

Related Questions

I have a link that I want to center vertically in the .well class
Edit: I'm not an Html pro. I want to add this text : AIM
I have an image and some text. I want to center both of them
I want to center a div in the document body in jquery. I have
I want to center a background image. There is no div used, this is
I have a horizontal unordered list I want to center horizontally in a div
I want align the div to center. like this I have tried margin-top, vertical-align
I want to position a DIV 200 pixels to left of the center. I
Please help. I want to achieve that text and button on yellow box be
I currently have a tab image that I want to re-create in CSS, 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.