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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T03:24:44+00:00 2026-06-05T03:24:44+00:00

I am developing an application where users will be able to open tabs. For

  • 0

I am developing an application where users will be able to open tabs. For your note, I am using the Bootstrap CSS framework, and it has a tab plugin as well. (In case I need a more flexible approach I can use a different library for this job.)

http://twitter.github.com/bootstrap/javascript.html#tabs

What I need is to have a flexible width for tabs. It should work like Chrome/Firefox’s tabs. If the collective width of the tabs is less than the width of the bar, it should work as it is is. However if it is longer than the width of the bar, then the size of each tab width should reduce equally. (If you open 10-20 tabs using chrome/firefox, you’ll understand what I mean)

Is there any easy way to do this, without using javascript? The only solution that comes up to my mind is to get the inner width of the bar using javascript and get the width of the other tabs and sum them up. If the sum is higher, then I can resize each tab.

I can implement this solution but I fear it will be hard to ensure cross browser compatibility. Is there any easier way to achieve this?

Thanks in advance,

  • 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-05T03:24:46+00:00Added an answer on June 5, 2026 at 3:24 am

    You don’t need JavaScript as long as you can rely on a CSS algorithm that adapt width to its content: the table layout algorithm 🙂

    See http://jsfiddle.net/r9yrM/1/ from my previous answer for examples.

    Don’t forget to have a minimum padding on each “cell”, text stuck to a border isn’t very readable (and ugly).

    With JS, you could decide of a maximum number of tabs (or a minimum “reasonable” width) and above (below) that number, add a class on the parent that will trigger each tab to render as float: left and block and not table-cell anymore. Then it’ll occupy 2 or more lines (like the extension Tab Mix Plus on Firefox)

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

Sidebar

Related Questions

I'm developing a Web application that will let users upload images. My concern is
I'm developing an application that will allow users to call external code from both
I am currently developing a site using SSL that requires users to be able
I am developing a web application with PHP where a user will be able
in the Mac application I am currently developing the users will need to be
I am developing a small flash application. In my application users should be able
I'm developing an ASP.NET MVC application that will send the user a confirmation email.
Hai every one, I am developing an application where users can subscribe or unsubscribe
I am developing an application that needs to inform users (around 1800) on a
I am developing Android Application for Chat between two users as private session .

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.