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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:50:30+00:00 2026-05-16T07:50:30+00:00

I have a List that I’m using as a list of tabs: <div id=SearchForm>

  • 0

I have a List that I’m using as a list of tabs:

<div id="SearchForm">
    <ul class="TabControl">
        <li>
            <a href="/search/Funds">Funds (60)</a>
        </li>
        <li>
            <a href="/search/Companies">Companies (4)</a>
        </li>
        <li>
            <a href="/search/Groups">Groups (1)</a>
        </li>
        <li>
            <a href="/search/Categories">Categories (0)</a>
        </li>
        <li>
            <a href="/search/Categories">Identifiers (60)</a>
        </li>
    </ul>
</div>

where the CSS is defined as follows:

#SearchForm ul {
    list-style: none;
    padding:0;
    margin: 15px 0 5px 0;
}

#SearchForm li {
    display: inline;
    background-color: #F6E9D8;
    margin: 12px 6px 0 0;
    padding: 6px 0 6px 0;   
}

#SearchForm li a {
    padding: 0 20px;
}

This list only takes up about 90% of the width available to it on the page, where everything else in the page takes up 100% of the width because they’re laid out in divs. The space avaiable to them is defined in an element supplied by the client at

 width: 62.1em

Basically what I need is to get the tabs to be distributed evenly so they fill the entire width available to them, with the text/link aligned in the middle of each tab? Is there a way for me to do this?

  • 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-16T07:50:30+00:00Added an answer on May 16, 2026 at 7:50 am

    But of course. I’ve put together a demo here. The CSS is as follows with explanation as comments:

    #SearchForm {
        /* Set width of parent div */
        width: 62.1em;   
    }
    
    #SearchForm ul {
        /* Make ul take 100% of its parent's width */
        width: 100%;
    
        list-style: none;
        padding: 0;
        margin: 15px 0 5px 0;
    }
    
    #SearchForm li {
        /* Float the li's left and give them 20% width (20% * 5 = 100%) */
        float: left;
        width: 20%;
    
        /* Make sure no horizontal padding/margin is applied.  Since we've set an 
           explicit width on the li, horizontal padding/margins would add to this, 
           making the element greater than 20% width and causing float drop */        
        margin: 12px 0 0 0;
        padding: 6px 0;   
    }
    
    #SearchForm li a {
        /* Set the nested links to display block and align their text center */
        display: block;
        text-align: center;
    
        /* Here we can safely apply horizontal padding/margins because we haven't
           explicitly set a width on the element */
        margin: 0 6px 0 0;
        padding: 0 20px;
    
        background-color: #F6E9D8;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list that has two items: projects and groups. Projects can go
I have a list that is kind of like this: <li class=listElement semiUniqueCLassOne unique-class=semiUniqueCLassOne
I have a list that resembles: <ol> <li class=node>1</li> <li class=node>2</li> <li class=node>3</li> <li
in Android, I have list that I fill using the following code @Override public
I have a list that looks like this <ul> <li class=expandable>Game <ul> <li>Action</li> <li>RPG</li>
I have a list that when a link is selected, the div's associated will
I have a list that contains 10**7 lists in the format: big_list = [[1,
I have a list that looks like this: l1 = ['200:200', '90:728'] I have
I have a list that I am trying to fill with numbers from a
I have a list that I want to loop through (for trimtemp in trim)

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.